Skip to content

net/http/httputil: ReverseProxy uses CloseNotifier before body consumption #13666

@orivej

Description

@orivej

Since 99fb191, one of Consul tests does not pass because CloseNotify for clientGone gets triggered in httputil.ReverseProxy.ServeHTTP when the client in fact is not gone.

How to reproduce:

go get -u -v github.com/hashicorp/consul
go test github.com/hashicorp/consul/api -run TestLock_MonitorRetry

The test should not fail, but does since aforementioned commit. If I comment out requestCanceler.CancelRequest(outreq) in net/http/httputil/reverseproxy.go, it passes again.

Downstream issue: hashicorp/consul#1524

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions