diff options
author | Aoang <aoang@x2ox.com> | 2022-02-18 17:52:19 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-18 10:52:19 +0100 |
commit | b85d2a274b3eca3769edd34517b7ba567bcf8819 (patch) | |
tree | 9b0150a7177a8cead485d9e4782c6ebde1f7ea73 /fasthttpproxy | |
parent | RequestHeader support set no default ContentType (#1218) (diff) | |
download | fasthttp-b85d2a274b3eca3769edd34517b7ba567bcf8819.tar.gz fasthttp-b85d2a274b3eca3769edd34517b7ba567bcf8819.tar.bz2 fasthttp-b85d2a274b3eca3769edd34517b7ba567bcf8819.zip |
Fix http proxy behavior (#1221)
Add Host header fix behavior
https://datatracker.ietf.org/doc/html/rfc7230#section-5.4
Diffstat (limited to 'fasthttpproxy')
-rw-r--r-- | fasthttpproxy/http.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fasthttpproxy/http.go b/fasthttpproxy/http.go index 6bc9c1e..2d91813 100644 --- a/fasthttpproxy/http.go +++ b/fasthttpproxy/http.go @@ -49,7 +49,7 @@ func FasthttpHTTPDialerTimeout(proxy string, timeout time.Duration) fasthttp.Dia return nil, err } - req := "CONNECT " + addr + " HTTP/1.1\r\n" + req := fmt.Sprintf("CONNECT %s HTTP/1.1\r\nHost: %s\r\n", addr, addr) if auth != "" { req += "Proxy-Authorization: Basic " + auth + "\r\n" } |