|
@@ 323-335 (lines=13) @@
|
| 320 |
|
// Return since no more processing for an OPTIONS request is required |
| 321 |
|
return; |
| 322 |
|
} catch (ResourceNotFoundException $e) { |
| 323 |
|
if (substr($url, -1) !== '/') { |
| 324 |
|
// We allow links to apps/files? for backwards compatibility reasons |
| 325 |
|
// However, since Symfony does not allow empty route names, the route |
| 326 |
|
// we need to match is '/', so we need to append the '/' here. |
| 327 |
|
try { |
| 328 |
|
$parameters = $matcher->match($url . '/'); |
| 329 |
|
} catch (ResourceNotFoundException $newException) { |
| 330 |
|
// If we still didn't match a route, we throw the original exception |
| 331 |
|
throw $e; |
| 332 |
|
} |
| 333 |
|
} else { |
| 334 |
|
throw $e; |
| 335 |
|
} |
| 336 |
|
} |
| 337 |
|
} |
| 338 |
|
|
|
@@ 342-354 (lines=13) @@
|
| 339 |
|
try { |
| 340 |
|
$parameters = $matcher->match($url); |
| 341 |
|
} catch (ResourceNotFoundException $e) { |
| 342 |
|
if (substr($url, -1) !== '/') { |
| 343 |
|
// We allow links to apps/files? for backwards compatibility reasons |
| 344 |
|
// However, since Symfony does not allow empty route names, the route |
| 345 |
|
// we need to match is '/', so we need to append the '/' here. |
| 346 |
|
try { |
| 347 |
|
$parameters = $matcher->match($url . '/'); |
| 348 |
|
} catch (ResourceNotFoundException $newException) { |
| 349 |
|
// If we still didn't match a route, we throw the original exception |
| 350 |
|
throw $e; |
| 351 |
|
} |
| 352 |
|
} else { |
| 353 |
|
throw $e; |
| 354 |
|
} |
| 355 |
|
} |
| 356 |
|
|
| 357 |
|
\OC::$server->getEventLogger()->start('run_route', 'Run route'); |