You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please answer these questions before submitting your issue. Thanks!
What did you do?
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
Run this server: https://play.golang.org/p/s4dAekw0Tn — it listens 2 sockets and proxies requests from one address to another to ensure final endpoint receives requests via single connection.
It depends on whether #18447 is a regression from 1.7 or it's just a matter of documenting extra cancelation case in Request.Context() docs. If former, this bug is likely a duplicate, if latter, it's probably a separate issue — it seems that Handlers can receive Requests with already canceled context if multiple requests are sent via single http/1.1 keep-alive connection.
I'm able to reproduce this without httputil.ReverseProxy just using netcat against final endpoint (localhost:8081) as well.
go1.7.4 ¶ go run repro.go
2016/12/28 22:54:30 &{{0xc4201000e0}} new
2016/12/28 22:54:30 &{{0xc4201000e0}} active
2016/12/28 22:54:34 ok
2016/12/28 22:54:34 &{{0xc4201000e0}} idle
2016/12/28 22:54:34 &{{0xc4201000e0}} active
2016/12/28 22:54:35 ok
2016/12/28 22:54:35 &{{0xc4201000e0}} idle
2016/12/28 22:54:35 &{{0xc4201000e0}} active
2016/12/28 22:54:36 ok
2016/12/28 22:54:36 &{{0xc4201000e0}} idle
go1.8beta2:
go1.8beta2 ¶ go run repro.go
2016/12/28 22:56:14 &{{0xc42006a070}} new
2016/12/28 22:56:14 &{{0xc42006a070}} active
2016/12/28 22:56:17 context canceled
2016/12/28 22:56:17 &{{0xc42006a070}} idle
2016/12/28 22:56:17 &{{0xc42006a070}} active
2016/12/28 22:56:17 context canceled
2016/12/28 22:56:17 &{{0xc42006a070}} idle
2016/12/28 22:56:17 &{{0xc42006a070}} active
2016/12/28 22:56:17 context canceled
2016/12/28 22:56:17 &{{0xc42006a070}} idle
Pretty sure #18447 is a behavior bug and those cancellations should not be coming through. In that case, this will be fixed by the same fix. Closing as dup of #18447.
Please answer these questions before submitting your issue. Thanks!
What did you do?
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
Run this server: https://play.golang.org/p/s4dAekw0Tn — it listens 2 sockets and proxies requests from one address to another to ensure final endpoint receives requests via single connection.
This issue likely related to #18447
What did you expect to see?
What did you see instead?
Does this issue reproduce with the latest release (go1.7.4)?
No
System details
The text was updated successfully, but these errors were encountered: