[issue27299] urllib does not splitport while putrequest realhost to HTTP headers

gr zhang report at bugs.python.org
Sun Jun 12 00:10:49 EDT 2016


New submission from gr zhang:

h.putheader('Host', "www.github.com:443")             
# this will make errcode 405, if urllib lib splitport first, and this will set Host ---> www.github.com and get 200 code.
h.endheaders(None)
errcode, errmsg, headers = h.getreply()
print errcode

----------
components: Library (Lib)
files: urllib_part.py
messages: 268317
nosy: gr zhang
priority: normal
severity: normal
status: open
title: urllib does not splitport while putrequest realhost to HTTP headers
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file43356/urllib_part.py

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


More information about the Python-bugs-list mailing list