Closed
Description
Node:
var server = require('http').createServer(function(request, response){
console.log('foo?');
response.end('It Works!! Path Hit: ' + request.url);
});
server.listen(3200);
Telnet:
[andrew.betts ~]$ telnet localhost 3200
Connected to localhost.
GET HTTP/1.1 HTTP/1.1
Connection closed by foreign host.
Expected: An error to be thrown or the request to be handled.
Actual: No error is thrown, the server callback is not invoked, and the connection is closed.
This seems to suggest to me that it is impossible for me to correctly handle malformed HTTP requests from my Node application. I would like to be able to return a valid HTTP 400 Bad Request response.