visionmedia/express — Issue #869: HEAD Request - On 404
Author: hugdubois
Created: 2011-10-25 10:40:56+00:00
State: open

if i send a head request on a 404 url, i have the node warning "This type of response MUST NOT have a body. Ignoring data passed to end()"

The context is :

$ npm install express jade
$ node_modules/express/bin/express .
destination is not empty, continue? y
...
$ node app.js
Express server listening on port 3000 in development mode
...

$ curl --head http://localhost:3000/
HTTP/1.1 200 OK
X-Powered-By: Express
Content-Type: text/html; charset=utf-8
Content-Length: 277
Connection: keep-alive
__==> everything is ok__

$ curl --head http://localhost:3000/foo
HTTP/1.1 404 Not Found
X-Powered-By: Express
Content-Type: text/plain
Connection: keep-alive
__==> curl response is ok but i have in console a node warning "This type of response MUST NOT have a body. Ignoring data passed to end()"__