mirror of
https://github.com/golang/go
synced 2024-11-18 11:14:39 -07:00
minor simplification
This commit is contained in:
parent
c3d0e2a1da
commit
56dd718358
@ -460,7 +460,7 @@ func (p *ReverseProxy) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
|
||||
rw.WriteHeader(code)
|
||||
|
||||
// Clear headers, it's not automatically done by ResponseWriter.WriteHeader() for 1xx responses
|
||||
for k, _ := range h {
|
||||
for k := range h {
|
||||
delete(h, k)
|
||||
}
|
||||
|
||||
@ -489,6 +489,7 @@ func (p *ReverseProxy) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
|
||||
if !p.modifyResponse(rw, res, outreq) {
|
||||
return
|
||||
}
|
||||
|
||||
copyHeader(rw.Header(), res.Header)
|
||||
|
||||
// The "Trailer" header isn't included in the Transport's response,
|
||||
|
Loading…
Reference in New Issue
Block a user