mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
@@ -96,14 +96,14 @@ class HTTPHeaderDict(CaseInsensitiveDict):
|
||||
self.extend({} if data is None else data, **kwargs)
|
||||
|
||||
|
||||
#
|
||||
#
|
||||
# We'll store tuples in the internal dictionary, but present them as a
|
||||
# concatenated string when we use item access methods.
|
||||
#
|
||||
def __setitem__(self, key, val):
|
||||
# Special–case null values.
|
||||
if (not isinstance(val, basestring)) and (val is not None):
|
||||
raise ValueError('only string-type values are allowed')
|
||||
raise ValueError('only string-type values (or None) are allowed')
|
||||
|
||||
super(HTTPHeaderDict, self).__setitem__(key, (val,))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user