serve: trailing slash added to static files does not take query string into account #28071
Closed
1 task
Labels
angular/build:dev-server
area: @angular/build
freq1: low
Only reported by a handful of users who observe it rarely
severity3: broken
type: bug/fix
Command
serve
Is this a regression?
The previous version in which this bug was not present was
No response
Description
This is more or less a continuation of #27949. I was testing the fix for that issue in Angular 18.1.0 and found that it is still not working. And since I cannot reopen that issue I'm writing this new one.
Whenever I try to access a static file without a trailing slash, angular returns a redirect to the same path with a trailing backslash.
But if the path contains a query string, then the trailing backslash is added to the end of the query string:
So I end up in an infinite redirect loop that ends with a
ERR_TOO_MANY_REDIRECTS
error and the following URI:Minimal Reproduction
The same used in #27949. Just add some query string parameter to the static file.
Exception or Error
No response
Your Environment
Anything else relevant?
Pinging @alan-agius4 as you are already familiar with the issue.
The text was updated successfully, but these errors were encountered: