diff options
author | Laurent Ghigonis <laurent@p1sec.com> | 2013-06-19 18:52:54 +0200 |
---|---|---|
committer | Laurent Ghigonis <laurent@p1sec.com> | 2013-06-19 18:52:54 +0200 |
commit | cd56c6945b2439260a83f86f3190ef7ea59ff0f4 (patch) | |
tree | f92ebfa08783339cd627db4523bb12a203455f97 /tools/yeshttpd.py | |
parent | jsaccess: add "jstore edit" (diff) | |
download | laurent-tools-cd56c6945b2439260a83f86f3190ef7ea59ff0f4.tar.xz laurent-tools-cd56c6945b2439260a83f86f3190ef7ea59ff0f4.zip |
tools: add yeshttpd, the always kind HTTP daemon
Diffstat (limited to 'tools/yeshttpd.py')
-rw-r--r-- | tools/yeshttpd.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/yeshttpd.py b/tools/yeshttpd.py new file mode 100644 index 0000000..3642f2a --- /dev/null +++ b/tools/yeshttpd.py @@ -0,0 +1,15 @@ +#!/usr/bin/env python + +# Web server returning always a kind message on GET requests + +import SimpleHTTPServer +import BaseHTTPServer + +class Yeshttpd_handler(SimpleHTTPServer.SimpleHTTPRequestHandler): + def do_GET(self): + print "handle req" + self.wfile.write("Hello my dear") + return None + +if __name__ == '__main__': + BaseHTTPServer.test(Yeshttpd_handler, BaseHTTPServer.HTTPServer) |