Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue33365

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:http/client.py does not print correct headers in debug
Type:Stage:resolved
Components:Library (Lib)Versions:Python 3.8, Python 3.7, Python 3.6
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To:Nosy List: barry, miss-islington, mstrigl, r.david.murray, serhiy.storchaka
Priority:normalKeywords:patch

Created on2018-04-26 12:12 bymstrigl, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.

Files
File nameUploadedDescriptionEdit
complete_pretty_headers.patchmstrigl,2018-04-26 12:12review
Pull Requests
URLStatusLinkedEdit
PR 6611mergedmstrigl,2018-04-26 12:33
PR 7792mergedmiss-islington,2018-06-19 13:23
PR 7793mergedmiss-islington,2018-06-19 13:24
Messages (5)
msg315787 -(view)Author: Marco Strigl (mstrigl)*Date: 2018-04-26 12:12
Consider the following script: try:    from urllib import requestexcept ImportError:    import urllib2 as requesthandler = 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.pysend: '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: closeheader: Server: gunicorn/19.7.1header: Date: Thu, 26 Apr 2018 12:01:35 GMTheader: Content-Type: application/jsonheader: Access-Control-Allow-Origin: *header: Access-Control-Allow-Credentials: trueheader: X-Powered-By: Flaskheader: X-Processed-Time: 0header: Content-Length: 40header: Via: 1.1 vegurBut 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.pysend: 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-Typeheader: 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.
msg319961 -(view)Author: Serhiy Storchaka (serhiy.storchaka)*(Python committer)Date: 2018-06-19 13:21
New changeset936f03e7fafc28fd6fdfba11d162c776b89c0167 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
msg319967 -(view)Author: miss-islington (miss-islington)Date: 2018-06-19 13:52
New changeset2edcf0a3db608457f42f4e4b74aff28237b4c91b 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
msg319968 -(view)Author: miss-islington (miss-islington)Date: 2018-06-19 13:52
New changeset34cd4821ed97639896f85bdf0c0d5c75b23f8a76 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
msg319969 -(view)Author: Serhiy Storchaka (serhiy.storchaka)*(Python committer)Date: 2018-06-19 13:54
Thank you for your contribution Marco!
History
DateUserActionArgs
2022-04-11 14:58:59adminsetgithub: 77546
2018-06-19 13:54:02serhiy.storchakasetstatus: open -> closed
resolution: fixed
messages: +msg319969

stage: patch review -> resolved
2018-06-19 13:52:47miss-islingtonsetmessages: +msg319968
2018-06-19 13:52:40miss-islingtonsetnosy: +miss-islington
messages: +msg319967
2018-06-19 13:24:45miss-islingtonsetpull_requests: +pull_request7398
2018-06-19 13:23:47miss-islingtonsetpull_requests: +pull_request7397
2018-06-19 13:21:01serhiy.storchakasetnosy: +serhiy.storchaka
messages: +msg319961
2018-05-08 12:42:38serhiy.storchakasetnosy: +barry,r.david.murray

versions: - Python 3.4, Python 3.5
2018-04-26 12:33:00mstriglsetstage: patch review
pull_requests: +pull_request6307
2018-04-26 12:12:56mstriglcreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp