Initial commit
This commit is contained in:
commit
2e41cb1c32
7
README
Normal file
7
README
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
Replies with HTTP status 200 Your Mom
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
|
||||||
|
./yourmomasaservice.py
|
||||||
|
|
||||||
|
curl -i localhost:8080
|
20
yourmomasaservice.py
Executable file
20
yourmomasaservice.py
Executable file
|
@ -0,0 +1,20 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
import BaseHTTPServer
|
||||||
|
import SocketServer
|
||||||
|
|
||||||
|
PORT = 8080
|
||||||
|
|
||||||
|
class YourMomServer(BaseHTTPServer.BaseHTTPRequestHandler):
|
||||||
|
def do_GET(self):
|
||||||
|
self.send_response(200, "Your Mom")
|
||||||
|
|
||||||
|
|
||||||
|
httpd = SocketServer.TCPServer(("", PORT), YourMomServer)
|
||||||
|
|
||||||
|
def serve():
|
||||||
|
return 1
|
||||||
|
|
||||||
|
while serve():
|
||||||
|
httpd.handle_request()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user