
This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
Created on2018-04-26 12:12 bymstrigl, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| complete_pretty_headers.patch | mstrigl,2018-04-26 12:12 | review | ||
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 6611 | merged | mstrigl,2018-04-26 12:33 | |
| PR 7792 | merged | miss-islington,2018-06-19 13:23 | |
| PR 7793 | merged | miss-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)*![]() | 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)*![]() | Date: 2018-06-19 13:54 | |
Thank you for your contribution Marco! | |||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:58:59 | admin | set | github: 77546 |
| 2018-06-19 13:54:02 | serhiy.storchaka | set | status: open -> closed resolution: fixed messages: +msg319969 stage: patch review -> resolved |
| 2018-06-19 13:52:47 | miss-islington | set | messages: +msg319968 |
| 2018-06-19 13:52:40 | miss-islington | set | nosy: +miss-islington messages: +msg319967 |
| 2018-06-19 13:24:45 | miss-islington | set | pull_requests: +pull_request7398 |
| 2018-06-19 13:23:47 | miss-islington | set | pull_requests: +pull_request7397 |
| 2018-06-19 13:21:01 | serhiy.storchaka | set | nosy: +serhiy.storchaka messages: +msg319961 |
| 2018-05-08 12:42:38 | serhiy.storchaka | set | nosy: +barry,r.david.murray versions: - Python 3.4, Python 3.5 |
| 2018-04-26 12:33:00 | mstrigl | set | stage: patch review pull_requests: +pull_request6307 |
| 2018-04-26 12:12:56 | mstrigl | create | |