projects
/
services
/
python-requests.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
abcf81e
)
merge headers, don't overwrite
author
Kenneth Reitz
<me@kennethreitz.com>
Wed, 17 Aug 2011 06:49:29 +0000
(
02:49
-0400)
committer
Kenneth Reitz
<me@kennethreitz.com>
Wed, 17 Aug 2011 06:49:29 +0000
(
02:49
-0400)
requests/sessions.py
patch
|
blob
|
history
diff --git
a/requests/sessions.py
b/requests/sessions.py
index 540089cc85cc4f472f698759bc7cb265132aca47..50b09f612de83e2eb1e524b8e58f8fccf69e939a 100644
(file)
--- a/
requests/sessions.py
+++ b/
requests/sessions.py
@@
-67,6
+67,9
@@
class Session(object):
inst_attrs['cookies'], kwargs['cookies']
)
+ if kwargs.get('headers', None) and inst_attrs.get('headers', None):
+ kwargs['headers'].update(inst_attrs['headers'])
+
return func(*args, **kwargs)
return wrapper_func