From 996785e821557f866c899914f83fddffb7303874 Mon Sep 17 00:00:00 2001 From: jngrt Date: Mon, 28 Apr 2014 23:57:39 +0200 Subject: [PATCH] message dir bug in clientserve --- meshenger_clientserve.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshenger_clientserve.py b/meshenger_clientserve.py index 2cad69a..e719e28 100644 --- a/meshenger_clientserve.py +++ b/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: