aboutsummaryrefslogtreecommitdiff
path: root/http.go
diff options
context:
space:
mode:
authorGravatar Scott Kidder <scott@kidder.io> 2023-10-30 11:08:51 -0700
committerGravatar GitHub <noreply@github.com> 2023-10-30 19:08:51 +0100
commit42bd7bb7e27a1c529b908892f9ce73f52cfd2292 (patch)
treeb4592f5de13b8d2ae08faf8a55ec792f08dd99fc /http.go
parentBUGFIX: HostClient.DialDualStack not work when using DoDeadline (#1634) (diff)
downloadfasthttp-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.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/http.go b/http.go
index 0a5b446..2dd9061 100644
--- a/http.go
+++ b/http.go
@@ -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() {