I face to a problem to limit post size of request, when file uploading from browser
When server process a request on file uploading, servlet throw error when request file size is bigger when limit (multipart config size limit from servlet 3.0 or other size limitation option)
But after that ProcessorTask class do the finishResponse method and do the inputBuffer.endRequest()
This method read all data from client (for example we upload 2GB file, servlet upload 30 Mb, throw exception on limit, and after that glassfish read remaining 1970Mb of data)
When url is not exist (404 error) ProcessorTask also read all file from client (more then limit) and after that shows an 404 error.
It is not a normal.
My question is a how to break connection on glassfish to avoid a full file uploading?
Should glassfish break connection on size limit (max-post-size, multipart config file size limit)?