diff --git a/ChangeLog b/ChangeLog index 3aa7a334..2b991923 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,7 @@ HTML data in debug output print line number in UrlData.__str__() * set HTTP Host: header for virtual domains + comment out the Host: header in httplib.py * only send HTTP authorization header when its needed 8.3.2000 Version 1.1.1 diff --git a/httplib.py b/httplib.py index fced7639..d1b1f618 100644 --- a/httplib.py +++ b/httplib.py @@ -247,7 +247,7 @@ class HTTPConnection: # try one more time (the socket was closed; this will reopen) self.send(str) - self.putheader('Host', self.host) + #self.putheader('Host', self.host) if self._http_vsn == 11: # Issue some standard headers for better HTTP/1.1 compliance diff --git a/linkcheck/HttpUrlData.py b/linkcheck/HttpUrlData.py index 706067f4..98528ed9 100644 --- a/linkcheck/HttpUrlData.py +++ b/linkcheck/HttpUrlData.py @@ -99,6 +99,7 @@ class HttpUrlData(UrlData): if self.urlConnection: self.closeConnection() self.urlConnection = self._getHTTPObject(host) + print host if self.proxy: path = urlparse.urlunparse(self.urlTuple) else: @@ -108,7 +109,9 @@ class HttpUrlData(UrlData): if self.urlTuple[4]: path = path + "?" + self.urlTuple[4] self.urlConnection.putrequest(method, path) + print path self.urlConnection.putheader("Host", self.urlTuple[1]) + print self.urlTuple[1] if auth: self.urlConnection.putheader("Authorization", auth) self.urlConnection.putheader("User-agent", Config.UserAgent)