diff options
-rw-r--r-- | schemes/http.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/schemes/http.py b/schemes/http.py index 219eb9b..0a5c73c 100644 --- a/schemes/http.py +++ b/schemes/http.py @@ -80,8 +80,10 @@ def fetch(link, acceptedtypes): conn = httplib.HTTPConnection(netloc) elif scheme == 'https': conn = httplib.HTTPSConnection(netloc) - # the requests adds a correct host header for us - conn.putrequest('GET', path) + conn.set_debuglevel(100) + # start the request + conn.putrequest('GET', path, skip_host=True) + conn.putheader('Host', urllib.splitport(netloc)[0]) if userpass is not None: (user, passwd) = urllib.splitpasswd(userpass) conn.putheader( |