aboutsummaryrefslogtreecommitdiffstats
path: root/netlib
diff options
context:
space:
mode:
Diffstat (limited to 'netlib')
-rw-r--r--netlib/http/http1/read.py4
-rw-r--r--netlib/multidict.py2
2 files changed, 4 insertions, 2 deletions
diff --git a/netlib/http/http1/read.py b/netlib/http/http1/read.py
index bf4c2f0c..a4c341fd 100644
--- a/netlib/http/http1/read.py
+++ b/netlib/http/http1/read.py
@@ -340,7 +340,9 @@ def _read_headers(rfile):
raise ValueError()
ret.append((name, value))
except ValueError:
- raise exceptions.HttpSyntaxException("Invalid headers")
+ raise exceptions.HttpSyntaxException(
+ "Invalid header line: %s" % repr(line)
+ )
return headers.Headers(ret)
diff --git a/netlib/multidict.py b/netlib/multidict.py
index dc0f3466..982a1178 100644
--- a/netlib/multidict.py
+++ b/netlib/multidict.py
@@ -105,7 +105,7 @@ class _MultiDict(MutableMapping, basetypes.Serializable):
if self._kconv(field[0]) == key_kconv:
if values:
new_fields.append(
- (key, values.pop(0))
+ (field[0], values.pop(0))
)
else:
new_fields.append(field)