From 78db120b3d9e9ded282a895550a3fbadeeef0741 Mon Sep 17 00:00:00 2001 From: Dr Scofield Date: Mon, 26 Jan 2009 21:32:43 +0000 Subject: + adding test server for debugging purposes --- .../Avatar/Concierge/testserver/ConciergeServer.py | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 OpenSim/Region/Environment/Modules/Avatar/Concierge/testserver/ConciergeServer.py (limited to 'OpenSim/Region/Environment/Modules/Avatar') diff --git a/OpenSim/Region/Environment/Modules/Avatar/Concierge/testserver/ConciergeServer.py b/OpenSim/Region/Environment/Modules/Avatar/Concierge/testserver/ConciergeServer.py new file mode 100644 index 0000000..a1a7750 --- /dev/null +++ b/OpenSim/Region/Environment/Modules/Avatar/Concierge/testserver/ConciergeServer.py @@ -0,0 +1,31 @@ +#!/usr/bin/env python +# -*- encoding: utf-8 -*- + +import logging +import BaseHTTPServer + +class ConciergeHandler(BaseHTTPServer.BaseHTTPRequestHandler): + def do_HEAD(req): + logging.info('[Concierge] %(command)s request: %(host)s:%(port)d --- %(path)s', + dict(command = self.command, + host = self.client_address[0], + port = self.client_address[1], + path = self.path)) + + req.send_response(200) + req.send_header('Content-type', 'text/html') + req.send_headers() + + logging.info('[Concierge] %(command)s returned 200', dict(command = self.command)) + +if __name__ == '__main__': + + httpServer = BaseHTTPServer.HTTPServer(('', 8080), ConciergeHandler) + logging.info('[ConciergeServer] starting') + + try: + httpServer.serve_forever() + except KeyboardInterrupt: + logging.info('[ConciergeServer] terminating') + + httpServer.server_close() -- cgit v1.1