I'm writing a http server with Node.js.
I have a client to upload a large file to this server via HTTP POST(multipart/data).
I want to accept the only connection which upload the file with valid filename.(I have some conditions.) The invalid filename connection should be disconnected before the server retrieves the data.
I have no idea how to disconnect the http request connection and return the proper http response.
The http request has only req.pause() method which isn't an answer. and if I call req.connection.end(), the response.writeHeader()/write() doesn't send the response.