diff options
| author | Damien Neil <dneil@google.com> | 2022-09-16 10:28:42 -0700 |
|---|---|---|
| committer | Damien Neil <dneil@google.com> | 2022-09-16 17:59:31 +0000 |
| commit | a84f46a28a1a9ffc0183fed394b6969c10fad502 (patch) | |
| tree | e4949f92f4cc23f96f8e0ce5b2e0689e5c96e3f0 /src/net/http/httputil/reverseproxy.go | |
| parent | 8451529e9ab26901f952976f9dcadd498d808c32 (diff) | |
| download | go-a84f46a28a1a9ffc0183fed394b6969c10fad502.tar.xz | |
net/http/httputil: remove duplicated code block
Remove a harmless but redundant section of code introduced
in CL 407214.
Change-Id: Id6522e6ff13a283d726b3b97dfc72f101884f733
Reviewed-on: https://go-review.googlesource.com/c/go/+/431395
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Tatiana Bradley <tatiana@golang.org>
Run-TryBot: Damien Neil <dneil@google.com>
Diffstat (limited to 'src/net/http/httputil/reverseproxy.go')
| -rw-r--r-- | src/net/http/httputil/reverseproxy.go | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/net/http/httputil/reverseproxy.go b/src/net/http/httputil/reverseproxy.go index 677b12bf26..fb1aa0f3e4 100644 --- a/src/net/http/httputil/reverseproxy.go +++ b/src/net/http/httputil/reverseproxy.go @@ -447,12 +447,6 @@ func (p *ReverseProxy) ServeHTTP(rw http.ResponseWriter, req *http.Request) { outreq.Header.Set("User-Agent", "") } - if _, ok := outreq.Header["User-Agent"]; !ok { - // If the outbound request doesn't have a User-Agent header set, - // don't send the default Go HTTP client User-Agent. - outreq.Header.Set("User-Agent", "") - } - trace := &httptrace.ClientTrace{ Got1xxResponse: func(code int, header textproto.MIMEHeader) error { h := rw.Header() |
