Created
December 19, 2012 00:08
-
-
Save aweeks/4333305 to your computer and use it in GitHub Desktop.
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
var http = require('http'); | |
http.createServer(function (req, res) { | |
res.writeHead(304, {'Transfer-Encoding': 'chunked'}); | |
res.end(); | |
}).listen(8000, '127.0.0.1'); | |
OUTPUT: | |
$ printf "GET / HTTP/1.1\n\n" | netcat localhost 8000 | |
HTTP/1.1 304 Not Modified | |
Transfer-Encoding: chunked | |
Date: Wed, 19 Dec 2012 00:05:09 GMT | |
Connection: keep-alive | |
0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment