fix quoting

git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@877 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
calvin 2003-05-01 13:39:52 +00:00
parent 4a2d2c444d
commit 10ddb75519

View file

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