Browse Source

message dir bug in clientserve

develop
jngrt 11 years ago
parent
commit
996785e821
  1. 4
      meshenger_clientserve.py

4
meshenger_clientserve.py

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

Loading…
Cancel
Save