summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2011-02-25 10:18:11 (GMT)
committerGeorg Brandl <georg@python.org>2011-02-25 10:18:11 (GMT)
commit2774310c27c6a8f4eb0d7d35e977767fa70d144f (patch)
tree9d16c573424046bb167f2e7bf68729f5063eb8bc /Lib
parentd98934c48381a1128fc5e2d0fa1d57f9ec584041 (diff)
downloadcpython-2774310c27c6a8f4eb0d7d35e977767fa70d144f.zip
cpython-2774310c27c6a8f4eb0d7d35e977767fa70d144f.tar.gz
cpython-2774310c27c6a8f4eb0d7d35e977767fa70d144f.tar.bz2
Merged revisions 87627,87638,87739,87760,87771,87787,87984,87986,88108,88115,88144,88165,88329,88364-88365,88369-88370,88423-88424 via svnmerge from
svn+ssh://svn.python.org/python/branches/py3k ........ r87627 | georg.brandl | 2011-01-02 15:23:43 +0100 (So, 02 Jan 2011) | 1 line #1665333: add more docs for optparse.OptionGroup. ........ r87638 | georg.brandl | 2011-01-02 20:07:51 +0100 (So, 02 Jan 2011) | 1 line Fix code indentation. ........ r87739 | georg.brandl | 2011-01-04 18:27:13 +0100 (Di, 04 Jan 2011) | 1 line Fix exception catching. ........ r87760 | georg.brandl | 2011-01-05 11:59:48 +0100 (Mi, 05 Jan 2011) | 1 line Fix duplicate end tag. ........ r87771 | georg.brandl | 2011-01-05 22:47:47 +0100 (Mi, 05 Jan 2011) | 1 line On Py3k, -tt and -3 are no-op and unsupported respectively. ........ r87787 | georg.brandl | 2011-01-06 10:15:45 +0100 (Do, 06 Jan 2011) | 1 line Remove doc for nonexisting parameter. ........ r87984 | georg.brandl | 2011-01-13 08:24:40 +0100 (Do, 13 Jan 2011) | 1 line Add semicolon for consistency. ........ r87986 | georg.brandl | 2011-01-13 08:31:18 +0100 (Do, 13 Jan 2011) | 1 line Fix the example output of count(). ........ r88108 | georg.brandl | 2011-01-19 09:42:03 +0100 (Mi, 19 Jan 2011) | 1 line Suppress trailing spaces in table paragraphs. ........ r88115 | georg.brandl | 2011-01-19 21:05:49 +0100 (Mi, 19 Jan 2011) | 1 line #10944: add c_bool to types table. ........ r88144 | georg.brandl | 2011-01-22 23:06:24 +0100 (Sa, 22 Jan 2011) | 1 line #10983: fix several bugs in the _tunnel implementation that seem to have missed while porting between branches. A unittest is needed! ........ r88165 | georg.brandl | 2011-01-24 20:53:18 +0100 (Mo, 24 Jan 2011) | 1 line Typo fix. ........ r88329 | georg.brandl | 2011-02-03 08:08:25 +0100 (Do, 03 Feb 2011) | 1 line Punctuation typos. ........ r88364 | georg.brandl | 2011-02-07 13:10:46 +0100 (Mo, 07 Feb 2011) | 1 line #11138: fix order of fill and align specifiers. ........ r88365 | georg.brandl | 2011-02-07 13:13:58 +0100 (Mo, 07 Feb 2011) | 1 line #8691: document that right alignment is default for numbers. ........ r88369 | georg.brandl | 2011-02-07 16:30:45 +0100 (Mo, 07 Feb 2011) | 1 line Consistent heading spacing, and fix two typos. ........ r88370 | georg.brandl | 2011-02-07 16:44:27 +0100 (Mo, 07 Feb 2011) | 1 line Spelling fixes. ........ r88423 | georg.brandl | 2011-02-15 13:41:17 +0100 (Di, 15 Feb 2011) | 1 line Apply logging SocketHandler doc update by Vinay. ........ r88424 | georg.brandl | 2011-02-15 13:44:43 +0100 (Di, 15 Feb 2011) | 1 line Remove editing slip. ........
Diffstat (limited to 'Lib')
-rw-r--r--Lib/email/charset.py4
-rw-r--r--Lib/http/client.py6
2 files changed, 5 insertions, 5 deletions
diff --git a/Lib/email/charset.py b/Lib/email/charset.py
index a44b711..898beed 100644
--- a/Lib/email/charset.py
+++ b/Lib/email/charset.py
@@ -294,7 +294,7 @@ class Charset:
"""Header-encode a string by converting it first to bytes.
This is similar to `header_encode()` except that the string is fit
- into maximum line lengths as given by the arguments.
+ into maximum line lengths as given by the argument.
:param string: A unicode string for the header. It must be possible
to encode this string to bytes using the character set's
@@ -305,8 +305,6 @@ class Charset:
and should never be exhausted. The maximum line lengths should
not count the RFC 2047 chrome. These line lengths are only a
hint; the splitter does the best it can.
- :param firstmaxlen: The maximum line length of the first line. If
- None (the default), then `maxlen` is used for the first line.
:return: Lines of encoded strings, each with RFC 2047 chrome.
"""
# See which encoding we should use.
diff --git a/Lib/http/client.py b/Lib/http/client.py
index 296dafb..3c70fe1 100644
--- a/Lib/http/client.py
+++ b/Lib/http/client.py
@@ -663,6 +663,7 @@ class HTTPConnection:
self._method = None
self._tunnel_host = None
self._tunnel_port = None
+ self._tunnel_headers = {}
self._set_hostport(host, port)
if strict is not None:
@@ -698,13 +699,14 @@ class HTTPConnection:
def _tunnel(self):
self._set_hostport(self._tunnel_host, self._tunnel_port)
- connect_str = "CONNECT %s:%d HTTP/1.0\r\n" %(self.host, self.port)
+ connect_str = "CONNECT %s:%d HTTP/1.0\r\n" % (self.host, self.port)
connect_bytes = connect_str.encode("ascii")
self.send(connect_bytes)
- for header, value in self._tunnel_headers.iteritems():
+ for header, value in self._tunnel_headers.items():
header_str = "%s: %s\r\n" % (header, value)
header_bytes = header_str.encode("ascii")
self.send(header_bytes)
+ self.send(b'\r\n')
response = self.response_class(self.sock, strict = self.strict,
method = self._method)