aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Concierge/testserver/ConciergeServer.py31
1 files changed, 31 insertions, 0 deletions
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 @@
1#!/usr/bin/env python
2# -*- encoding: utf-8 -*-
3
4import logging
5import BaseHTTPServer
6
7class ConciergeHandler(BaseHTTPServer.BaseHTTPRequestHandler):
8 def do_HEAD(req):
9 logging.info('[Concierge] %(command)s request: %(host)s:%(port)d --- %(path)s',
10 dict(command = self.command,
11 host = self.client_address[0],
12 port = self.client_address[1],
13 path = self.path))
14
15 req.send_response(200)
16 req.send_header('Content-type', 'text/html')
17 req.send_headers()
18
19 logging.info('[Concierge] %(command)s returned 200', dict(command = self.command))
20
21if __name__ == '__main__':
22
23 httpServer = BaseHTTPServer.HTTPServer(('', 8080), ConciergeHandler)
24 logging.info('[ConciergeServer] starting')
25
26 try:
27 httpServer.serve_forever()
28 except KeyboardInterrupt:
29 logging.info('[ConciergeServer] terminating')
30
31 httpServer.server_close()