diff options
author | Scott Kidder <scott@kidder.io> | 2023-10-30 11:08:51 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-30 19:08:51 +0100 |
commit | 42bd7bb7e27a1c529b908892f9ce73f52cfd2292 (patch) | |
tree | b4592f5de13b8d2ae08faf8a55ec792f08dd99fc /http.go | |
parent | BUGFIX: HostClient.DialDualStack not work when using DoDeadline (#1634) (diff) | |
download | fasthttp-42bd7bb7e27a1c529b908892f9ce73f52cfd2292.tar.gz fasthttp-42bd7bb7e27a1c529b908892f9ce73f52cfd2292.tar.bz2 fasthttp-42bd7bb7e27a1c529b908892f9ce73f52cfd2292.zip |
Allow redirect URI path to not be normalized. (#1638)
* Allow redirect URI path to not be normalized.
* Introduce DisableRedirectPathNormalizing field to Request
* Use field name as start of comment.
Co-authored-by: Erik Dubbelboer <erik@dubbelboer.com>
---------
Co-authored-by: Erik Dubbelboer <erik@dubbelboer.com>
Diffstat (limited to 'http.go')
-rw-r--r-- | http.go | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -71,6 +71,12 @@ type Request struct { // Use Host header (request.Header.SetHost) instead of the host from SetRequestURI, SetHost, or URI().SetHost UseHostHeader bool + + // DisableRedirectPathNormalizing disables redirect path normalization when used with DoRedirects. + // + // By default redirect path values are normalized, i.e. + // extra slashes are removed, special characters are encoded. + DisableRedirectPathNormalizing bool } // Response represents HTTP response. @@ -1080,6 +1086,7 @@ func (req *Request) Reset() { req.resetSkipHeader() req.timeout = 0 req.UseHostHeader = false + req.DisableRedirectPathNormalizing = false } func (req *Request) resetSkipHeader() { |