valyala / fasthttp

Fast HTTP package for Go. Tuned for high performance. Zero memory allocations in hot paths. Up to 10x faster than net/http
MIT License
21.91k stars 1.76k forks source link

Bug: Redirect location is always normalized #1637

Closed skidder closed 1 year ago

skidder commented 1 year ago

The location specified in a redirect response is always normalized, regardless of how the DisablePathNormalizing field is configured on the original request URI.

This behavior can cause issues if the server expects the redirect path to not be escaped. This problem was found while working with Google Drive URIs, where the redirect location contained an asterisk (*) that was then escaped to %2A, leading to an HTTP 500 response.