Skip to content

Instantly share code, notes, and snippets.

@martynjarvis
Created January 27, 2015 10:55
Show Gist options
  • Save martynjarvis/6450d2b19a6b2f1b35df to your computer and use it in GitHub Desktop.
Save martynjarvis/6450d2b19a6b2f1b35df to your computer and use it in GitHub Desktop.
Simple HTTP servers

Simple HTTP web servers:

Using python:

python -m SimpleHTTPServer 8000

Using nc (while testing a bad content length header):

while true; do { echo -e 'HTTP/1.1 200 OK\r\nContent-Length: 666\r\n'; cat index.html; } | nc -l 8000; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment