-
Notifications
You must be signed in to change notification settings - Fork 18k
net/http/httputil: httputil.ReverseProxy does not call ModifyResponse on failed requests #21255
New issue
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
Comments
which one should be logged? merr, err, or both? |
There is the It would be good though, if |
The api for If no one minds, I can submit a CL for this. /cc @bradfitz |
Change https://golang.org/cl/54030 mentions this issue: |
Any update on this issue/CL? /cc @mvdan |
Change https://golang.org/cl/86435 mentions this issue: |
…on failed requests" This reverts commit https://golang.org/cl/54030 Reason for revert: to not paint ourselves into a corner. See #23009 Fixes #23009 Updates #21255 Change-Id: I68caab078839b9d2bf645a7bbed8405a5a30cd22 Reviewed-on: https://go-review.googlesource.com/86435 Reviewed-by: Ian Lance Taylor <iant@golang.org>
Change https://golang.org/cl/86476 mentions this issue: |
No longer needs to be done. Updates #23009 Updates #21255 Change-Id: I78e9e29a923dc03dea89ff3a5bf60f2e0bd0c0aa Reviewed-on: https://go-review.googlesource.com/86476 Reviewed-by: Ian Lance Taylor <iant@golang.org>
Change https://golang.org/cl/77410 mentions this issue: |
What version of Go are you using (
go version
)?go version go1.8.3 darwin/amd64
What operating system and processor architecture are you using (
go env
)?What did you do?
I setup a
httputils.ReverseProxy
with aModifyResponse
method:https://play.golang.org/p/U7R9-oxBfq
What did you expect to see?
I expected that the
EYE-CATCHER ON RESPONSE
log entry would appear when calling/invalid
as well.What did you see instead?
The
EYE-CATCHER ON RESPONSE
log entry only came up on/google
but not on/invalid
.Looking at the code of
httputil.ReverseProxy
: If there is a proxy error thenServeHTTP
immediately returns without applyingModifyResponse
:https://github.com/golang/go/blob/master/src/net/http/httputil/reverseproxy.go#L202
ModifyResponse
is only applied in the good case:https://github.com/golang/go/blob/master/src/net/http/httputil/reverseproxy.go#L222
The text was updated successfully, but these errors were encountered: