From 8b05746da5d94624a9d0f0840381010c6f209f66 Mon Sep 17 00:00:00 2001 From: Cameron Dale Date: Tue, 1 Apr 2008 16:18:00 -0700 Subject: [PATCH] Fix a bug caused by twisted unquoting URLs received by the web server. --- apt_p2p/HTTPServer.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apt_p2p/HTTPServer.py b/apt_p2p/HTTPServer.py index 224f411..b5a858d 100644 --- a/apt_p2p/HTTPServer.py +++ b/apt_p2p/HTTPServer.py @@ -214,7 +214,8 @@ class TopLevel(resource.Resource): return None, () # Find the file in the database - hash = unquote_plus(segments[1]) + # Have to unquote_plus the uri, because the segments are unquoted by twisted + hash = unquote_plus(request.uri[3:]) files = self.db.lookupHash(hash) if files: # If it is a file, return it -- 2.30.2