We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ab82a97 commit 829b991Copy full SHA for 829b991
Lib/urllib2.py
@@ -1295,7 +1295,7 @@ def ftp_open(self, req):
1295
if retrlen is not None and retrlen >= 0:
1296
headers += "Content-length: %d\n" % retrlen
1297
headers = email.message_from_string(headers)
1298
- sf = StringIO(headers)
+ sf = StringIO(str(headers))
1299
return addinfourl(fp, headers, req.get_full_url())
1300
except ftplib.all_errors as msg:
1301
raise URLError('ftp error: %s' % msg).with_traceback(sys.exc_info()[2])
0 commit comments