SVN: r23940 - trunk/quixote/server
Neil Schemenauer <nascheme-fVcApmY9cLvQ3/1i3zOLAti2O/[email protected]> Thu, 08 Apr 2004 10:09:57 -0400
| Newsgroups | gmane.comp.web.quixote.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: nascheme
Date: 2004-04-08 10:09:57 -0400 (Thu, 08 Apr 2004)
New Revision: 23940
Modified:
trunk/quixote/server/twisted_http.py
Log:
Twisted does not unquote the path so twisted_http.py has to do it.
Modified: trunk/quixote/server/twisted_http.py
===================================================================
--- trunk/quixote/server/twisted_http.py 2004-04-08 14:00:06 UTC (rev 23939)
+++ trunk/quixote/server/twisted_http.py 2004-04-08 14:09:57 UTC (rev 23940)
@@ -15,6 +15,7 @@
# standard Quixote response headers (expires, date)
+import urllib
from twisted.internet.app import Application
from twisted.protocols import http
from twisted.web import server
@@ -65,6 +66,12 @@
"""
Borrowed heavily from twisted.web.twcgi
"""
+ # Twisted doesn't decode the path for us,
+ # so let's do it here. This is also
+ # what medusa_http.py does, right or wrong.
+ if '%' in self.path:
+ self.path = urllib.unquote(self.path)
+
serverName = self.getRequestHostname().split(':')[0]
env = {"SERVER_SOFTWARE": server.version,
"SERVER_NAME": serverName,