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
What does 'go version' print?
go1.3.3 windows/amd64
go1.3.3 linux/amd64
What steps reproduce the problem?
1. go run main.go
What happened?
The 2nd request will fail with EOF.
What should have happened instead?
Both requests should succeed without error.
Please provide any additional information below.
The server is an IIS reverse proxy to a go http server.
Response header sample:
HTTP/1.1 200 OK
Date: Tue, 18 Nov 2014 11:12:09 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
Content-Type: application/json;charset=utf-8
Date: Tue, 18 Nov 2014 11:12:08 GMT
Transfer-Encoding: chunked
Via: 1.1 203.80.2.39 (IIRF v2.1)
After further investigation, it seems the problem exists for non chunked content as well.
The problem only occurs when the go server is behind the IIS reverse proxy.
Updated repro is attached.
Sample Header (IIS reverse proxy):
HTTP/1.1 200 OK
Date: Wed, 19 Nov 2014 03:02:24 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
Content-Type: application/json; charset=utf-8
Date: Wed, 19 Nov 2014 03:02:24 GMT
Content-Length: 85
Via: 1.1 203.80.2.39 (IIRF v2.1)
Sample Header (local):
HTTP/1.1 200 OK
Content-Length: 90
Content-Type: application/json; charset=utf-8
Date: Wed, 19 Nov 2014 03:03:35 GMT
The server is misbehaving.
It's replying HTTP/1.1 200 OK (which implies it supports keep-alive connections in the
absence of any indicator to the contrary), and it doesn't have a "Connection: close"
header, but then it just closes the connection immediately.
The Go code meanwhile assumes it's conforming and tries to send another request on that
connection but then it receives the EOF from the peer closing the first request.
Workaround: disable KeepAlives on the http.Transport you're using.
This is a dup of issue #4677
by Benny.TPNG:
Attachments:
The text was updated successfully, but these errors were encountered: