diff --git a/httplib.py.old b/httplib.py index 19bcd1b..e648624 100644 --- a/httplib.py.old +++ b/httplib.py @@ -859,6 +859,10 @@ class HTTPConnection: self._method = method if not url: url = '/' + if not isinstance(url, basestring): + url = '%s' % url + if not isinstance(url, str): + url = url.encode('utf-8') hdr = '%s %s %s' % (method, url, self._http_vsn_str) self._output(hdr)