quote url before request submit, previous map() call was useless

git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@950 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
calvin 2003-07-23 23:26:39 +00:00
parent 8c4c79493e
commit 2be119e899

View file

@ -239,14 +239,13 @@ class HttpUrlData (ProxyUrlData):
self.closeConnection()
self.urlConnection = self._getHTTPObject(host)
# quote parts before submit
map(quote, self.urlparts[2:5])
qurlparts = self.urlparts[:]
qurlparts[2:5] = map(quote, self.urlparts[2:5])
if self.proxy:
path = urlparse.urlunsplit(self.urlparts)
path = urlparse.urlunsplit(qurlparts)
else:
path = urlparse.urlunsplit(('', '', self.urlparts[2],
self.urlparts[3], self.urlparts[4]))
# unquote parts again
map(unquote, self.urlparts[2:5])
path = urlparse.urlunsplit(('', '', qurlparts[2],
qurlparts[3], qurlparts[4]))
self.urlConnection.putrequest(method, path, skip_host=1)
self.urlConnection.putheader("Host", host)
# userinfo is from http://user@pass:host/