Prevent crash of httpserver in some requests. (Why? No idea.)

This commit is contained in:
Valentin Lorentz 2013-03-21 17:31:53 +00:00
parent cac96aa5f7
commit 5209cbc402

View File

@ -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)