Created
October 20, 2014 11:09
-
-
Save jledet/27939b5bdf90cffe982a to your computer and use it in GitHub Desktop.
HTTP 204 Return
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2 | |
import BaseHTTPServer | |
HOST='10.0.0.202' | |
PORT=80 | |
class Handler(BaseHTTPServer.BaseHTTPRequestHandler): | |
def do_GET(s): | |
s.send_response(204) | |
s.end_headers() | |
def main(): | |
server_class = BaseHTTPServer.HTTPServer | |
httpd = server_class((HOST, PORT), Handler) | |
try: | |
httpd.serve_forever() | |
except KeyboardInterrupt: | |
pass | |
httpd.server_close() | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment