Since proxy_pass by default uses HTTP 1.0 shouldn’t it also clear the
Connection header by default?
This causes major problems for the unsuspecting reverse proxy that
encounters a .NET system.net.WebClient request. WebClient automatically
sends Connection: keep-alive even for a HTTP 1.1 request. Some calls to
WebClient#downloadFile will apparently chew up a connection in the
underlying .NET connection pool, and then WebClient will hang waiting
for a connection to free up without issuing the HTTP GET request.
The fix was to do
proxy_set_header Connection ""
For some reason “proxy_http_version 1.1” by itself didn’t do anything to
prevent the random WebClient hangs.