Created
December 19, 2010 16:13
-
-
Save novemberborn/747439 to your computer and use it in GitHub Desktop.
HTTP response parsing errors are emitted from the client, not the response object
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
require("net").createServer(function(stream){ | |
stream.end("INVALID\r\n\r\nhttp"); | |
}).listen(8080, "127.0.0.1"); | |
require("http").createClient(8080, "127.0.0.1") | |
.on("error", function(err){ | |
console.error("Client error\n%s", err.stack); | |
}) | |
.request("GET", "/", {}).on("response", function(){ console.log("Got response"); }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment