projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ab82a97
)
Fixed test_urllib2 by coercing Message object to str
author
Alexandre Vassalotti
<alexandre@peadrop.com>
Thu, 12 Jun 2008 18:02:10 +0000
(18:02 +0000)
committer
Alexandre Vassalotti
<alexandre@peadrop.com>
Thu, 12 Jun 2008 18:02:10 +0000
(18:02 +0000)
before passing it to io.StringIO.write().
Lib/urllib2.py
patch
|
blob
|
history
diff --git
a/Lib/urllib2.py
b/Lib/urllib2.py
index 575bee88268d135c8d78f451789289895f145a1a..4bcd3973092c68fc825d53d297e89274a7f1cb9d 100644
(file)
--- a/
Lib/urllib2.py
+++ b/
Lib/urllib2.py
@@
-1295,7
+1295,7
@@
class FTPHandler(BaseHandler):
if retrlen is not None and retrlen >= 0:
headers += "Content-length: %d\n" % retrlen
headers = email.message_from_string(headers)
- sf = StringIO(
headers
)
+ sf = StringIO(
str(headers)
)
return addinfourl(fp, headers, req.get_full_url())
except ftplib.all_errors as msg:
raise URLError('ftp error: %s' % msg).with_traceback(sys.exc_info()[2])