-
Notifications
You must be signed in to change notification settings - Fork 18k
net/http/httputil: ReverseProxy uses CloseNotifier before body consumption #13666
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
Are you using HTTP/1.1 pipelining? |
Nevermind, I see now that httputil.ReverseProxy doesn't obey the new tightened rules for CloseNotifier. I can fix. |
@bradfitz I can't see mention of the tightened rules in the release notes or on the mailing list. I guess you're referring to this CL and this new rule?:
For me, I get the I guess the fix is straightforward and the call to |
@pwaller I copy it and move code like that: https://gist.github.com/starchou/3fa257ea20fdf6babeab |
This was discussed a little on the list: http://thread.gmane.org/gmane.comp.lang.go.general/170241 |
CL https://golang.org/cl/18144 mentions this issue. |
Since 99fb191, one of Consul tests does not pass because
CloseNotify
forclientGone
gets triggered inhttputil.ReverseProxy.ServeHTTP
when the client in fact is not gone.How to reproduce:
The test should not fail, but does since aforementioned commit. If I comment out
requestCanceler.CancelRequest(outreq)
innet/http/httputil/reverseproxy.go
, it passes again.Downstream issue: hashicorp/consul#1524
The text was updated successfully, but these errors were encountered: