aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/server.py
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2021-03-03 23:25:52 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2021-03-03 23:25:52 +0300
commitc0068e035ca825579e8d41f60d3864eeb6df0c88 (patch)
tree5fd91401c25214e4ab9d916482c9f567c00c39a1 /server.py
parentmerge {reboot,poweroff}.sh into get.py (diff)
downloadlinux-status-c0068e035ca825579e8d41f60d3864eeb6df0c88.tar.gz
linux-status-c0068e035ca825579e8d41f60d3864eeb6df0c88.zip
no more CGI
The server.py script now launches a web server and handles all the requests internally, without delegating anything to external scripts.
Diffstat (limited to 'server.py')
-rwxr-xr-xserver.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/server.py b/server.py
index 9533be7..24ee72a 100755
--- a/server.py
+++ b/server.py
@@ -7,10 +7,10 @@
import http.server
-from get import Request
+from app import Request
-class RequestHandler(http.server.CGIHTTPRequestHandler):
+class RequestHandler(http.server.SimpleHTTPRequestHandler):
def do_GET(self):
try:
request = Request.from_http_path(self.path)