Skip to content
Snippets Groups Projects
Commit 4807b04b authored by developer23's avatar developer23
Browse files

- ver 4.0.5.0

- removed line for choise content-type extenstion in do_GET();
parent 1c70de88
No related merge requests found
...@@ -64,16 +64,13 @@ class GetHandler(BaseHTTPRequestHandler): ...@@ -64,16 +64,13 @@ class GetHandler(BaseHTTPRequestHandler):
self.path = "ais_readers.html" self.path = "ais_readers.html"
fname, ext = os.path.splitext(self.path) fname, ext = os.path.splitext(self.path)
fname = self.path.lstrip("/") fname = self.path.lstrip("/")
with open(os.path.join(os.curdir, self.path.lstrip("/"))) as f:
if ext in (".html", ".css", ".js"): self.send_response(200)
with open(os.path.join(os.curdir, self.path.lstrip("/"))) as f: self.send_header('Content-type', types_map[ext])
self.send_response(200) self.end_headers()
self.send_header('Content-type', types_map[ext]) self.wfile.write(f.read())
self.end_headers() f.close()
self.wfile.write(f.read())
f.close()
return return
except IOError: except IOError:
self.send_error(404,"File Not Found: %s" % self.path) self.send_error(404,"File Not Found: %s" % self.path)
...@@ -98,9 +95,6 @@ class GetHandler(BaseHTTPRequestHandler): ...@@ -98,9 +95,6 @@ class GetHandler(BaseHTTPRequestHandler):
device = ''.join(pq[DEVICE]) device = ''.join(pq[DEVICE])
self.wfile.write('proba')
if GetBaseName() == AIS_MAIN or GetBaseName() == AIS_MAIN_EXE: if GetBaseName() == AIS_MAIN or GetBaseName() == AIS_MAIN_EXE:
#log_dir = ''.join(pq[LOG_DIR]) #log_dir = ''.join(pq[LOG_DIR])
log_dir = 'debug_log' log_dir = 'debug_log'
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment