Message140571
| Author |
vstinner |
| Recipients |
daniel.ugra, davide.rizzo, nadeem.vawda, orsenthil, santoso.wijaya, vstinner |
| Date |
2011年07月18日.10:13:38 |
| SpamBayes Score |
5.8953865e-06 |
| Marked as misclassified |
No |
| Message-id |
<1310984019.79.0.397977022522.issue12576@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
imdb.com and python.org use HTTP/1.1. imdb.com server sends a "Transfer-encoding: chunked" header whereas python.org doesn't. python.org has a "Connection: close" header, whereas imdb.com doesn't.
The more revelant difference for this issue is the "Connection: close" header: HTTPResponse.wil_close is True if "Connection: close" header is present (see _check_close() method), it returns False otherwise. HTTPConnection.getresponse() keeps a reference to the response if will_close is False, or calls its close() method otherwise.
The "Cneonction: close" header looks to be a quirk of Netscaler loadbalancers. It is sometimes "nnCoection" uses the same load balancer.
There are buggy web servers, Python should not raise a "I/O closed file" error on such server. |
|