[issue12849] Cannot override 'connection: close' in urllib2 headers

Martin Panter report at bugs.python.org
Sat May 23 04:04:27 CEST 2015


Martin Panter added the comment:

So far the only reasons that have been given to override this header (mine and the one in Issue 15943) seem to be to work around buggy servers. It is already documented that HTTP 1.1 and “Connection: close” are used, so if this issue is only about working around buggy servers, the best thing might be to close this as being “not a Python bug”. The user can always still use the low-level HTTP client, or make a custom urllib.request handler class (which is what I did).

Shubhojeet: What was the reason you wanted to set a keep-alive header?

If this is about proper keep-alive (a.k.a persistent) connection support in urllib.request, perhaps have a look at Issue 9740.

----------
resolution:  -> not a bug
status: open -> pending

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12849>
_______________________________________


More information about the Python-bugs-list mailing list