[New-bugs-announce] [issue10983] Errors in http.client.HTTPConnection class (python3)

nooB report at bugs.python.org
Sat Jan 22 22:49:21 CET 2011

New submission from nooB <nsharish.mit at gmail.com>:

In python 3.x http.client.HTTPConnection class, I saw few problems.

1) `_tunnel_headers` not initialized in the __init__ method. This causes `set_tunnel` method to raise `AttributeError` when called without `headers` keyword argument.

2) In `_tunnel` method, `self._tunnel_headers.iteritems()` has been used instead of `self._tunnel_headers.items()`, which caused AttributeError.

3) In `_tunnel` method, the CONNECT request is incomplete and hangs.
self.send(b'\r\n') is missing after sending the headers.

messages: 126857
nosy: nooB
priority: normal
severity: normal
status: open
title: Errors in http.client.HTTPConnection class (python3)
versions: Python 3.1, Python 3.2, Python 3.3

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list