[issue33365] http/client.py does not print correct headers in debug

2018-06-19 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Thank you for your contribution Marco!

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue33365] http/client.py does not print correct headers in debug

2018-06-19 Thread miss-islington


miss-islington  added the comment:


New changeset 34cd4821ed97639896f85bdf0c0d5c75b23f8a76 by Miss Islington (bot) 
in branch '3.6':
bpo-33365: print the header values beside the keys (GH-6611)
https://github.com/python/cpython/commit/34cd4821ed97639896f85bdf0c0d5c75b23f8a76


--

___
Python tracker 

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



[issue33365] http/client.py does not print correct headers in debug

2018-06-19 Thread miss-islington


miss-islington  added the comment:


New changeset 2edcf0a3db608457f42f4e4b74aff28237b4c91b by Miss Islington (bot) 
in branch '3.7':
bpo-33365: print the header values beside the keys (GH-6611)
https://github.com/python/cpython/commit/2edcf0a3db608457f42f4e4b74aff28237b4c91b


--
nosy: +miss-islington

___
Python tracker 

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



[issue33365] http/client.py does not print correct headers in debug

2018-06-19 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7397

___
Python tracker 

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



[issue33365] http/client.py does not print correct headers in debug

2018-06-19 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 936f03e7fafc28fd6fdfba11d162c776b89c0167 by Serhiy Storchaka 
(Marco Strigl) in branch 'master':
bpo-33365: print the header values beside the keys (GH-6611)
https://github.com/python/cpython/commit/936f03e7fafc28fd6fdfba11d162c776b89c0167


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue33365] http/client.py does not print correct headers in debug

2018-06-19 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7398

___
Python tracker 

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



[issue33365] http/client.py does not print correct headers in debug

2018-05-08 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
nosy: +barry, r.david.murray
versions:  -Python 3.4, Python 3.5

___
Python tracker 

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



[issue33365] http/client.py does not print correct headers in debug

2018-04-26 Thread Marco Strigl

Change by Marco Strigl :


--
pull_requests: +6307
stage:  -> patch review

___
Python tracker 

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



[issue33365] http/client.py does not print correct headers in debug

2018-04-26 Thread Marco Strigl

New submission from Marco Strigl :

Consider the following script: 

try:
from urllib import request
except ImportError:
import urllib2 as request

handler = request.HTTPSHandler(debuglevel=1)
opener = request.build_opener(handler)
f = opener.open('https://httpbin.org/user-agent')


In python2.x this works: 

$ python2 http_client_bug.py
send: 'GET /user-agent HTTP/1.1\r\nAccept-Encoding: identity\r\nHost:
httpbin.org\r\nConnection: close\r\nUser-Agent: Python-urllib/2.7\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Connection: close
header: Server: gunicorn/19.7.1
header: Date: Thu, 26 Apr 2018 12:01:35 GMT
header: Content-Type: application/json
header: Access-Control-Allow-Origin: *
header: Access-Control-Allow-Credentials: true
header: X-Powered-By: Flask
header: X-Processed-Time: 0
header: Content-Length: 40
header: Via: 1.1 vegur


But in python3.x only the header keys are printed. Not the values (also a 
newline after each header will be nice):

$ python3 http_client_bug.py
send: b'GET /user-agent HTTP/1.1\r\nAccept-Encoding: identity\r\nHost:
httpbin.org\r\nUser-Agent: Python-urllib/3.6\r\nConnection: close\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Connection header: Server header: Date header: Content-Type
header: Access-Control-Allow-Origin header:
Access-Control-Allow-Credentials header: X-Powered-By header:
X-Processed-Time header: Content-Length header:

Patch for this is attached.

--
components: Library (Lib)
files: complete_pretty_headers.patch
keywords: patch
messages: 315787
nosy: mstrigl
priority: normal
severity: normal
status: open
title: http/client.py does not print correct headers in debug
versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8
Added file: https://bugs.python.org/file47550/complete_pretty_headers.patch

___
Python tracker 

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