You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When requesting the Departures of a station that contains slashes in its name via the v1 API, a 404 error is thrown. Replacing the slashes with spaces resolves the issue.
To Reproduce
Steps to reproduce the behavior:
Request departures for a station with a slash in its name, e.g. "Luisenplatz-Süd/Park Sanssouci, Potsdam" (https://beta.traewelling.de/api/v1/trains/station/Luisenplatz-S%C3%BCd%2FPark%20Sanssouci,%20Potsdam/departures?when=2022-05-24T16:58:05.077869Z&travelType=)
A 404 error is thrown
Request the departures with spaces instead of slashes (https://beta.traewelling.de/api/v1/trains/station/Luisenplatz-S%C3%BCd%20Park%20Sanssouci,%20Potsdam/departures?when=2022-05-24T16:58:05.077869Z&travelType=)
A result is delivered with the corresponding departures
Expected behavior
I expect the API to also deliver results for Stations with slashes
The text was updated successfully, but these errors were encountered:
Laravel does not support slashes in URL parameters and there are multiple issues to that wherein they explain that they won't fix this. (e.g. laravel/framework#22125)
There seems to be a workaround (laravel/framework#22125 (comment)) but this will break if there are more than one slashes in the url. In my opinion, a space instead of a slash would be the more consistent option but this needs to be documented.
// Origin Route
Route::get('/{query}', [\App\Http\Controllers\Front\User\CategoryController::class, 'category'])->name('category');
// Extra Route on the end of the route file:
Route::get('/{query}/{more?}', [\App\Http\Controllers\Front\User\CategoryController::class, 'category'])->name('category');
Describe the bug
When requesting the Departures of a station that contains slashes in its name via the v1 API, a 404 error is thrown. Replacing the slashes with spaces resolves the issue.
To Reproduce
Steps to reproduce the behavior:
https://beta.traewelling.de/api/v1/trains/station/Luisenplatz-S%C3%BCd%2FPark%20Sanssouci,%20Potsdam/departures?when=2022-05-24T16:58:05.077869Z&travelType=
)https://beta.traewelling.de/api/v1/trains/station/Luisenplatz-S%C3%BCd%20Park%20Sanssouci,%20Potsdam/departures?when=2022-05-24T16:58:05.077869Z&travelType=
)Expected behavior
I expect the API to also deliver results for Stations with slashes
The text was updated successfully, but these errors were encountered: