I was searching something and saw this post. It has been months since it was asked; but I wanted to write an answer so even if you don't need it anymore, someone looking for this can benefit...
This is the way http is designed so there is nothing you can do to change this behavior. You cannot stop a request and return response body. First, request headers and body are completely sent to server then response headers and body are sent back to client. If you don't want to accept such files to prevent unnecessary load and bandwidth costs, just drop the connection and let the client figure out what they did wrong. HTTP works like this; but web applications don't have to. If this is a web application, you can check what is wrong on client side. If there are things that you can only check at server-side, you can have multiple connections to the server and while sending a request on one connection, you can ask for status info for this big request on another connection... -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
