The server is refusing to process a request because the request entity is larger than the server is willing or able to process. The server MAY close the connection to prevent the client from continuing the request.
I had done it like this:
req.connection.destroy();
var body = "Forbidden";
res.writeHead(403, {
'Content-Type': 'text/html',
'Content-Length':
Buffer.byteLength(body)
});
res.end(body);
--
You received this message because you are subscribed to the Google Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com.
To unsubscribe from this group, send email to nodejs+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nodejs?hl=en.
403 Forbidden would be an incorrect response for the op's situation...From...http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
413 Request Entity Too Large
411 Length Required
Just sayin'
– Micheil
It could've also been:
411 Length Required
Just sayin'
Why won't bluesman's suggestion reach the client?
--i
--i