Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue29375

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:httplib: wrong Host header when connecting to IPv6 link-local address
Type:behaviorStage:needs patch
Components:Library (Lib)Versions:Python 3.7, Python 3.6, Python 3.5, Python 2.7
process
Status:openResolution:
Dependencies:Superseder:
Assigned To:Nosy List: JonathanGuthrie, gregory.p.smith, martin.panter
Priority:normalKeywords:

Created on2017-01-25 20:14 byJonathanGuthrie, last changed2022-04-11 14:58 byadmin.

Messages (3)
msg286276 -(view)Author: Jonathan Guthrie (JonathanGuthrie)Date: 2017-01-25 20:14
This is related toissue 5111.An IPv6 link-local address must include a scope specifier as part of the address passed to the HTTPConnection or HTTPSConnection constructor, that scope specifier is not being stripped from the address passed in the HTTP 1.1 Host: header line.So, suppose I was attempting to connect to an HTTP server on fe80::8aae:1dff:fea4:29c8.  That's a link-local address, so I must give the scope specifier, which is the interface I can use to connect to that address.  So, the address I would pass to the HTTPConnection constructor might look like "fe80::8aae:1dff:fea4:29c8%eth0".  The appropriate Host line in the HTTP request would be "Host: [fe80::8aae:1dff:fea4:29c8]" but it is actually "Host: [fe80::8aae:1dff:fea4:29c8%eth0]"Compliant HTTP servers reject requests including this line as malformed.
msg286286 -(view)Author: Martin Panter (martin.panter)*(Python committer)Date: 2017-01-25 23:18
More closely related:Issue 23448, about the same thing with urllib, which adds the Host value itself. Any solution should be shared between both modules.
msg286333 -(view)Author: Jonathan Guthrie (JonathanGuthrie)Date: 2017-01-26 21:13
Yes, it is more closely related toIssue 23448.  My search for related issues apparently wasn't exhaustive enough.
History
DateUserActionArgs
2022-04-11 14:58:42adminsetgithub: 73561
2017-01-26 21:13:35JonathanGuthriesetmessages: +msg286333
2017-01-25 23:18:40martin.pantersetnosy: +martin.panter
messages: +msg286286
2017-01-25 22:19:32gregory.p.smithsetnosy: +gregory.p.smith
2017-01-25 21:22:30martin.pantersetstage: needs patch
components: + Library (Lib)
versions: + Python 3.6, Python 3.7
2017-01-25 20:14:44JonathanGuthriecreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp