From 06a746e0da1de9c6656b8e9d13a1def2c1875ef5 Mon Sep 17 00:00:00 2001 From: calvin Date: Sat, 11 Mar 2000 20:14:36 +0000 Subject: [PATCH] httplib.py fix git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@28 e7d03fd6-7b0d-0410-9947-9c21f3af8025 --- ChangeLog | 1 + httplib.py | 2 +- linkcheck/HttpUrlData.py | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) 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)