diff options
Diffstat (limited to 'CollectionHTTPServer.py')
-rw-r--r-- | CollectionHTTPServer.py | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/CollectionHTTPServer.py b/CollectionHTTPServer.py deleted file mode 100644 index d2982fd..0000000 --- a/CollectionHTTPServer.py +++ /dev/null @@ -1,33 +0,0 @@ -""" -Implements the HTTP handler for log collection - -TODO: - decide on exact protocol - HTTP/1.1 - retrieve client's hostname - send to analyser - store in filesystem (later in storage backend) - log groups -""" - -import BaseHTTPServer -import socket - -class HTTPServer6(BaseHTTPServer.HTTPServer): - - address_family = socket.AF_INET6 - -class HTTPRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): - - #protocol_version = "HTTP/1.1" - - def do_POST(self): - print(self.client_address) - print(self.command, self.path, self.request_version) - print(self.headers.headers) - - size = int(self.headers.getheader('Content-Length')) - - print(self.rfile.read(size)) - self.send_response(200) - self.end_headers() |