SVN: r23941 - trunk/quixote/server

Neil Schemenauer <nascheme-fVcApmY9cLvQ3/1i3zOLAti2O/[email protected]> Thu, 08 Apr 2004 10:15:15 -0400
Newsgroups gmane.comp.web.quixote.cvs
Message-ID <[email protected]>
Author: nascheme
Date: 2004-04-08 10:15:15 -0400 (Thu, 08 Apr 2004)
New Revision: 23941

Modified:
   trunk/quixote/server/medusa_http.py
Log:
Medusa doesn't unquote the path, do it in medusa_http.py.


Modified: trunk/quixote/server/medusa_http.py
===================================================================
--- trunk/quixote/server/medusa_http.py	2004-04-08 14:09:57 UTC (rev 23940)
+++ trunk/quixote/server/medusa_http.py	2004-04-08 14:15:15 UTC (rev 23941)
@@ -10,7 +10,7 @@
 # A simple HTTP server, using Medusa, that publishes a Quixote application.
 
 import sys
-import asyncore, rfc822, socket
+import asyncore, rfc822, socket, urllib
 from StringIO import StringIO
 from medusa import http_server, xmlrpc_handler
 from quixote.http_response import Stream
@@ -64,6 +64,9 @@
             path = request.uri
             query_string = ''
 
+        if '%' in path:
+            path = urllib.unquote(path)
+
         server_port = str(self.server.port),
         http_host = msg.get("Host")
         if http_host: