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>
This commit is contained in:
Damien Neil 2022-09-16 10:28:42 -07:00
parent 8451529e9a
commit a84f46a28a

View file

@ -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()