message dir bug in clientserve

This commit is contained in:
jngrt 2014-04-28 23:57:39 +02:00
parent 54c2c0e754
commit 996785e821

View File

@ -12,7 +12,7 @@ import unicodedata
class ClientServeHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
messageDir = "/msg"
messageDir = "msg"
"""
Serve index and messages
@ -28,7 +28,7 @@ class ClientServeHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
with open( f, 'r') as the_file:
self.wfile.write(the_file.read())
elif self.path == '/index' or self.path.startswith( self.messageDir ):
elif self.path == '/index' or self.path.startswith( "/"+self.messageDir ):
return SimpleHTTPServer.SimpleHTTPRequestHandler.do_GET(self)
else: