Skip to content

Instantly share code, notes, and snippets.

@jledet
Created October 20, 2014 11:09
Show Gist options
  • Save jledet/27939b5bdf90cffe982a to your computer and use it in GitHub Desktop.
Save jledet/27939b5bdf90cffe982a to your computer and use it in GitHub Desktop.
HTTP 204 Return
#!/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