[issue5111] httplib: wrong Host header when connecting to IPv6 loopback
New submission from Guillaume Desmottes : To reproduce: - Launch a HTTP server listening on an Inet6 socket on, say, port - Try to connect using the IPv6 loopback: http = httplib.HTTPConnection('[::1]:') http.request('GET', '/foo') r = http.getresponse() print r.status - You get 400 (bad-request) instead of 404 It seems that's because the HTTP request is wrong. Python sends this header: Host: ::1: but it should be: Host: [::1]: I'm using python 2.5.2-1ubuntu1 on Intrepid. -- components: Library (Lib) messages: 80827 nosy: gdesmott severity: normal status: open title: httplib: wrong Host header when connecting to IPv6 loopback versions: Python 2.5 ___ Python tracker <http://bugs.python.org/issue5111> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5111] httplib: wrong Host header when connecting to IPv6 litteral URL
Guillaume Desmottes added the comment: Actually, this bug is present when you try to connect to any URL containing an IP6 and a port. So, we have the same problem when using, for example: http = httplib.HTTPConnection('[2a01:8790:16d:0:218:de87:164:8745]:') but http = httplib.HTTPConnection('[2001:4860:0:1001::68]:80') does work. Probably because we use the default HTTP port. -- title: httplib: wrong Host header when connecting to IPv6 loopback -> httplib: wrong Host header when connecting to IPv6 litteral URL ___ Python tracker <http://bugs.python.org/issue5111> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1194378] sendmsg() and recvmsg() for C socket module
Changes by Guillaume Desmottes : -- nosy: +gdesmott ___ Python tracker <http://bugs.python.org/issue1194378> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com