projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
15370: Fix up debug logs.
[arvados.git]
/
lib
/
controller
/
proxy.go
diff --git
a/lib/controller/proxy.go
b/lib/controller/proxy.go
index c0b94c2b5f76d604e738c2d9bc43d3a01f8bf5dc..13dfcac16abb0bb27c7b1f3d50d024436453f97c 100644
(file)
--- a/
lib/controller/proxy.go
+++ b/
lib/controller/proxy.go
@@
-9,7
+9,7
@@
import (
"net/http"
"net/url"
"net/http"
"net/url"
- "git.
curoverse.com
/arvados.git/sdk/go/httpserver"
+ "git.
arvados.org
/arvados.git/sdk/go/httpserver"
)
type proxy struct {
)
type proxy struct {
@@
-25,20
+25,26
@@
func (h HTTPError) Error() string {
return h.Message
}
return h.Message
}
-// headers that shouldn't be forwarded when proxying. See
-// https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers
var dropHeaders = map[string]bool{
var dropHeaders = map[string]bool{
+ // Headers that shouldn't be forwarded when proxying. See
+ // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers
"Connection": true,
"Keep-Alive": true,
"Proxy-Authenticate": true,
"Proxy-Authorization": true,
"Connection": true,
"Keep-Alive": true,
"Proxy-Authenticate": true,
"Proxy-Authorization": true,
- // this line makes gofmt 1.10 and 1.11 agree
- "TE": true,
- "Trailer": true,
- "Transfer-Encoding": true, // *-Encoding headers interfer with Go's automatic compression/decompression
- "Content-Encoding": true,
+ // (comment/space here makes gofmt1.10 agree with gofmt1.11)
+ "TE": true,
+ "Trailer": true,
+ "Upgrade": true,
+
+ // Headers that would interfere with Go's automatic
+ // compression/decompression if we forwarded them.
"Accept-Encoding": true,
"Accept-Encoding": true,
- "Upgrade": true,
+ "Content-Encoding": true,
+ "Transfer-Encoding": true,
+
+ // Content-Length depends on encoding.
+ "Content-Length": true,
}
type ResponseFilter func(*http.Response, error) (*http.Response, error)
}
type ResponseFilter func(*http.Response, error) (*http.Response, error)
@@
-74,9
+80,7
@@
func (p *proxy) Do(
Header: hdrOut,
Body: reqIn.Body,
}).WithContext(reqIn.Context())
Header: hdrOut,
Body: reqIn.Body,
}).WithContext(reqIn.Context())
-
- resp, err := client.Do(reqOut)
- return resp, err
+ return client.Do(reqOut)
}
// Copy a response (or error) to the downstream client
}
// Copy a response (or error) to the downstream client