[Medusa-dev] redirecting_handler bug fixed
SergioFernández
sfmunoz@teleline.es
Sun Nov 24 16:55:57 2002
Hello:
This is a little patch that makes 'redirecting_handler' to work properly
in Python 2.2 (SuSE 8.0). The error exists in 0.5.2, 0.5.3 and CVS (Nov
22, 2002) versions.
The problem is in handle_request (class redirecting_handler, file
redirecting_handler.py). When I tried to use this handler, I got the
following error:
error: Server Error: exceptions.IndexError, no such group: file: /usr/lib/python2.2/site-packages/medusa/redirecting_handler.py line: 28
192.168.0.1:1042 - - [24/Nov/2002:16:32:15 +0100] "GET /redirect.html HTTP/1.0" 500 311
To fix this error you can apply the following patch:
diff -urN medusa-0.5.3.orig/redirecting_handler.py medusa-0.5.3/redirecting_handler.py
--- medusa-0.5.3.orig/redirecting_handler.py Wed Mar 20 18:37:48 2002
+++ medusa-0.5.3/redirecting_handler.py Sat Nov 23 17:51:44 2002
@@ -25,7 +25,7 @@
def handle_request (self, request):
self.hits.increment()
m = self.patreg.match (request.uri)
- part = m.group(1)
+ part = m.group()
request['Location'] = self.redirect % part
request.error (302) # moved temporarily
Sergio
More information about the Medusa-dev
mailing list