From 5209cbc4021c2eb2207b10f90d37d423e254a7ab Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Thu, 21 Mar 2013 17:31:53 +0000 Subject: [PATCH] Prevent crash of httpserver in some requests. (Why? No idea.) --- src/httpserver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/httpserver.py b/src/httpserver.py index 26c1982f9..ab2c34403 100644 --- a/src/httpserver.py +++ b/src/httpserver.py @@ -216,7 +216,7 @@ class SupyHTTPRequestHandler(BaseHTTPRequestHandler): # We call doX, because this is more supybotic than do_X. path = self.path if not callback.fullpath: - path = '/' + path.split('/', 2)[2] + path = '/' + path.split('/', 2)[-1] getattr(callback, callbackMethod)(self, path, *args, **kwargs)