Navigation Menu

Skip to content
This repository has been archived by the owner on Jun 3, 2023. It is now read-only.

Commit

Permalink
Fix monitor Web server encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
maxbbraun committed Feb 10, 2019
1 parent b7bde98 commit e1b0006
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.py
Expand Up @@ -31,6 +31,9 @@
# The port for the monitor Web server.
MONITOR_PORT = 80

# The message returned by the monitor Web server.
MONITOR_MESSAGE = "OK"


class Monitor:
"""A monitor exposing a Web server while the main loop is running."""
Expand Down Expand Up @@ -64,7 +67,7 @@ def _set_headers(self):

def do_GET(self):
self._set_headers()
self.wfile.write("OK")
self.wfile.write(MONITOR_MESSAGE.encode("utf-8"))

def do_HEAD(self):
self._set_headers()
Expand Down

0 comments on commit e1b0006

Please sign in to comment.