-
-
Save znb/35bde20eab4d9e0cb7d5d8e17e724d79 to your computer and use it in GitHub Desktop.
Revisions
-
phrawzty revised this gist
Apr 16, 2020 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,5 @@ #!/usr/bin/env python3 import http.server as SimpleHTTPServer import socketserver as SocketServer import logging -
phrawzty revised this gist
Apr 16, 2020 . No changes.There are no files selected for viewing
-
phrawzty revised this gist
Mar 27, 2020 . 2 changed files with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ #!/usr/bin/env python2 import SimpleHTTPServer import SocketServer File renamed without changes. -
phrawzty revised this gist
Mar 27, 2020 . 2 changed files with 20 additions and 0 deletions.There are no files selected for viewing
File renamed without changes.This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ #!/usr/bin/env python3 import http.server as SimpleHTTPServer import socketserver as SocketServer import logging PORT = 8000 class GetHandler( SimpleHTTPServer.SimpleHTTPRequestHandler ): def do_GET(self): logging.error(self.headers) SimpleHTTPServer.SimpleHTTPRequestHandler.do_GET(self) Handler = GetHandler httpd = SocketServer.TCPServer(("", PORT), Handler) httpd.serve_forever() -
phrawzty revised this gist
Mar 5, 2015 . 1 changed file with 12 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ ``` $ curl -s -H "X-Something: yeah" localhost:8000 > /dev/null ``` ``` $ python serv.py ERROR:root:User-Agent: curl/7.37.1 Host: localhost:8000 Accept: */* X-Something: yeah 127.0.0.1 - - [05/Mar/2015 11:28:33] "GET / HTTP/1.1" 200 - ``` -
phrawzty created this gist
Mar 5, 2015 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ #!/usr/bin/env python import SimpleHTTPServer import SocketServer import logging PORT = 8000 class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): def do_GET(self): logging.error(self.headers) SimpleHTTPServer.SimpleHTTPRequestHandler.do_GET(self) Handler = GetHandler httpd = SocketServer.TCPServer(("", PORT), Handler) httpd.serve_forever()