Skip to content

Instantly share code, notes, and snippets.

@mashihua
Created February 14, 2012 08:01
Show Gist options
  • Save mashihua/1824740 to your computer and use it in GitHub Desktop.
Save mashihua/1824740 to your computer and use it in GitHub Desktop.
LBYL test
//test browser "look-before-you-leap" (LBYL) request
//expect is a header of HTTP/1.1
var http = require('http');
http.createServer(function(req,res){
console.log(req.header['user-agent'],req.header.expect);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment