diff -r 4329486b5c09 -r 7b7bb075aed8 Lib/http/client.py --- a/Lib/http/client.py Sat Nov 20 14:48:27 2010 -0500 +++ b/Lib/http/client.py Sat Nov 20 17:13:16 2010 -0500 @@ -71,7 +71,7 @@ import io import os import socket -from urllib.parse import urlsplit +from urllib.parse import urlsplit, urlunsplit import warnings __all__ = ["HTTPResponse", "HTTPConnection", @@ -834,8 +834,9 @@ # Save the method we use, we need it later in the response phase self._method = method - if not url: - url = '/' + req_scheme, req_netloc, req_path, req_query, req_fragment = urlsplit(url) + url = urlunsplit((req_scheme, req_netloc, req_path or '/', req_query, req_fragment)) + request = '%s %s %s' % (method, url, self._http_vsn_str) # Non-ASCII characters should have been eliminated earlier