kennethreitz/requests — Issue #421: unicode strings not allowed in headers
Author: pmdarrow
Created: 2012-02-12 06:47:58+00:00
State: open

```
>>> import requests
>>> requests.get('www.google.com', headers={'foo': u'bar'})
Traceback (most recent call last):
File "", line 1, in
File "/Users/peter/Code/envs/test/lib/python2.7/site-packages/requests/api.py", line 51, in get
return request('get', url, **kwargs)
File "/Users/peter/Code/envs/test/lib/python2.7/site-packages/requests/api.py", line 39, in request
return s.request(method=method, url=url, **kwargs)
File "/Users/peter/Code/envs/test/lib/python2.7/site-packages/requests/sessions.py", line 159, in request
headers[k] = header_expand(v)
File "/Users/peter/Code/envs/test/lib/python2.7/site-packages/requests/utils.py", line 152, in header_expand
for i, (value, params) in enumerate(headers):
ValueError: need more than 1 value to unpack
```