Unquote urls before trying to look them up in index files.
[quix0rs-apt-p2p.git] / apt_p2p / apt_p2p.py
index 7a5f9fa..1f04a87 100644 (file)
@@ -11,6 +11,7 @@
 
 from binascii import b2a_hex
 from urlparse import urlunparse
+from urllib import unquote
 import os, re, sha
 
 from twisted.internet import defer, reactor
@@ -193,7 +194,7 @@ class AptP2P:
         d = defer.Deferred()
         
         log.msg('Trying to find hash for %s' % url)
-        findDefer = self.mirrors.findHash(url)
+        findDefer = self.mirrors.findHash(unquote(url))
         
         findDefer.addCallbacks(self.findHash_done, self.findHash_error, 
                                callbackArgs=(req, url, d), errbackArgs=(req, url, d))