crystal icon indicating copy to clipboard operation
crystal copied to clipboard

Preserve query params in `StaticFileHandler` redirects

Open syeopite opened this issue 6 months ago • 2 comments

Closes #15788

Preserve query parameters when HTTP::StaticFileHandler performs a redirect

http://localhost:12345//route?k=v --> http://localhost:12345/route?k=v


I can't actually confirm if the specs itself pass because I'm not able to build std_spec locally for some reason. But it works correctly when running the same code on an isolated script with a locally built compiler.

syeopite avatar May 17 '25 14:05 syeopite

If you cannot build std_spec, maybe you can run just bin/crystal spec spec/std/http/server/handlers/static_file_handler_spec.cr?

straight-shoota avatar May 19 '25 08:05 straight-shoota

If you cannot build std_spec, maybe you can run just bin/crystal spec spec/std/http/server/handlers/static_file_handler_spec.cr?

Yeah that works.

I managed to also get std_spec working as well after installing lld so thankfully (well depending on how you look at it) the culprit was just due to issue 13193.

syeopite avatar May 19 '25 09:05 syeopite