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:
e663c77
)
bytes data fix for python3
author
Kenneth Reitz
<me@kennethreitz.com>
Wed, 15 Feb 2012 08:09:26 +0000
(
03:09
-0500)
committer
Kenneth Reitz
<me@kennethreitz.com>
Wed, 15 Feb 2012 08:09:26 +0000
(
03:09
-0500)
requests/models.py
patch
|
blob
|
history
diff --git
a/requests/models.py
b/requests/models.py
index
d676fb3
..
8ff4ad8
100644
(file)
--- a/
requests/models.py
+++ b/
requests/models.py
@@
-283,6
+283,9
@@
class Request(object):
returns it twice.
"""
+ if isinstance(data, bytes):
+ return data, data
+
if hasattr(data, '__iter__') and not isinstance(data, str):
data = dict(data)