httplib.py fix

git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@28 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
calvin 2000-03-11 20:14:36 +00:00
parent 708b3b54c5
commit 06a746e0da
3 changed files with 5 additions and 1 deletions

View file

@ -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

View file

@ -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

View file

@ -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)