aboutsummaryrefslogtreecommitdiff
path: root/fasthttpproxy
diff options
context:
space:
mode:
authorGravatar Maxim Korolyov <mkorolyov@humans.net> 2020-11-03 00:24:57 +0300
committerGravatar GitHub <noreply@github.com> 2020-11-02 22:24:57 +0100
commitd7752d2a7056486409472bda6b55d1fef03fa9c5 (patch)
treefa6fab7f0d911830580f731a53e84f2a6bb28a6c /fasthttpproxy
parentAdd Request.SetBodyRaw (diff)
downloadfasthttp-d7752d2a7056486409472bda6b55d1fef03fa9c5.tar.gz
fasthttp-d7752d2a7056486409472bda6b55d1fef03fa9c5.tar.bz2
fasthttp-d7752d2a7056486409472bda6b55d1fef03fa9c5.zip
fixed default schema for for req url (#897)
Diffstat (limited to 'fasthttpproxy')
-rw-r--r--fasthttpproxy/proxy_env.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/fasthttpproxy/proxy_env.go b/fasthttpproxy/proxy_env.go
index 9d5fe98..34089ca 100644
--- a/fasthttpproxy/proxy_env.go
+++ b/fasthttpproxy/proxy_env.go
@@ -35,6 +35,7 @@ func FasthttpProxyHTTPDialer() fasthttp.DialFunc {
const (
httpsScheme = "https"
+ httpScheme = "http"
tlsPort = "443"
)
@@ -52,7 +53,7 @@ func FasthttpProxyHTTPDialerTimeout(timeout time.Duration) fasthttp.DialFunc {
return nil, fmt.Errorf("unexpected addr format: %w", err)
}
- reqURL := &url.URL{Host: addr, Scheme: httpsScheme}
+ reqURL := &url.URL{Host: addr, Scheme: httpScheme}
if port == tlsPort {
reqURL.Scheme = httpsScheme
}