We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In Go1.12, the logic in the reverse proxy did the following:
go/src/net/http/httputil/reverseproxy.go
Lines 209 to 214 in f194c9f
which calls the helper function cloneHeader, which always allocates the headers:
cloneHeader
Lines 135 to 143 in f194c9f
The new logic calls the new http.Request.Clone method:
http.Request.Clone
Lines 198 to 201 in 0cadf40
which does not allocate the headers if the source did not have them set:
go/src/net/http/request.go
Lines 378 to 380 in 0cadf40
The new behavior seems slightly more correct, but the fact that the headers are now nil is an observable effect that breaks users.
The text was updated successfully, but these errors were encountered:
Change https://golang.org/cl/186437 mentions this issue: net/http/httputil: fix regression in ReverseProxy.ServeHTTP
net/http/httputil: fix regression in ReverseProxy.ServeHTTP
Sorry, something went wrong.
f93234a
No branches or pull requests
In Go1.12, the logic in the reverse proxy did the following:
go/src/net/http/httputil/reverseproxy.go
Lines 209 to 214 in f194c9f
which calls the helper function
cloneHeader
, which always allocates the headers:go/src/net/http/httputil/reverseproxy.go
Lines 135 to 143 in f194c9f
The new logic calls the new
http.Request.Clone
method:go/src/net/http/httputil/reverseproxy.go
Lines 198 to 201 in 0cadf40
which does not allocate the headers if the source did not have them set:
go/src/net/http/request.go
Lines 378 to 380 in 0cadf40
The new behavior seems slightly more correct, but the fact that the headers are now nil is an observable effect that breaks users.
The text was updated successfully, but these errors were encountered: