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

2016-06-11 Thread gr zhang

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 
<http://bugs.python.org/issue27299>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2016-06-11 Thread gr zhang

gr zhang added the comment:

Yes, I mean when set h.putheader('Host', "www.github.com:443") and the status 
code from httplib will be 405 while when set h.putheader('Host', 
"www.github.com") the code will be 200, this is confused to me.

--

___
Python tracker 
<http://bugs.python.org/issue27299>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com