mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-20 06:10:59 +00:00
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:
parent
8c4c79493e
commit
2be119e899
1 changed files with 5 additions and 6 deletions
|
|
@ -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/
|
||||
|
|
|
|||
Loading…
Reference in a new issue