summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Gregorio <jcgregorio@google.com>2012-11-12 13:08:04 -0500
committerJoe Gregorio <jcgregorio@google.com>2012-11-12 13:08:04 -0500
commit20846977d470fc623dda0a08712954dbe4a34c7d (patch)
tree1a56107a20b4703b4a0fb24ce6be5d4a6e6ea760
parent74b1d4a85cbf10e84b364bc17927f5420ae5d187 (diff)
downloadhttplib2-20846977d470fc623dda0a08712954dbe4a34c7d.tar.gz
Fix Python3 dup header handling.
Fixes isse #229.
-rw-r--r--Makefile2
-rw-r--r--python2/httplib2/__init__.py2
-rw-r--r--python3/httplib2/__init__.py10
-rwxr-xr-xsetup.py2
4 files changed, 10 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 62931d8..fac0480 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
tests:
-cd python2 && python2.4 httplib2test.py
-cd python2 && python2.5 httplib2test.py
- cd python2 && python2.6 httplib2test.py
+ -cd python2 && python2.6 httplib2test.py
cd python2 && python2.6 httplib2test_appengine.py
cd python2 && python2.7 httplib2test.py
cd python2 && python2.7 httplib2test_appengine.py
diff --git a/python2/httplib2/__init__.py b/python2/httplib2/__init__.py
index f984a92..2d260e3 100644
--- a/python2/httplib2/__init__.py
+++ b/python2/httplib2/__init__.py
@@ -22,7 +22,7 @@ __contributors__ = ["Thomas Broyer (t.broyer@ltgt.net)",
"Sam Ruby",
"Louis Nyffenegger"]
__license__ = "MIT"
-__version__ = "0.7.6"
+__version__ = "0.7.7"
import re
import sys
diff --git a/python3/httplib2/__init__.py b/python3/httplib2/__init__.py
index fe5eb38..fb63594 100644
--- a/python3/httplib2/__init__.py
+++ b/python3/httplib2/__init__.py
@@ -24,7 +24,7 @@ __contributors__ = ["Thomas Broyer (t.broyer@ltgt.net)",
"Louis Nyffenegger",
"Mark Pilgrim"]
__license__ = "MIT"
-__version__ = "0.7.6"
+__version__ = "0.7.7"
import re
import sys
@@ -1322,8 +1322,12 @@ class Response(dict):
# info is either an email.message or
# an httplib.HTTPResponse object.
if isinstance(info, http.client.HTTPResponse):
- for key, value in info.getheaders():
- self[key.lower()] = value
+ for key, value in info.getheaders():
+ key = key.lower()
+ prev = self.get(key)
+ if prev is not None:
+ value = ', '.join((prev, value))
+ self[key] = value
self.status = info.status
self['status'] = str(self.status)
self.reason = info.reason
diff --git a/setup.py b/setup.py
index b2e3ef4..98e27cc 100755
--- a/setup.py
+++ b/setup.py
@@ -5,7 +5,7 @@ except ImportError:
import sys
pkgdir = {'': 'python%s' % sys.version_info[0]}
-VERSION = '0.7.6'
+VERSION = '0.7.7'
setup(name='httplib2',
version=VERSION,