The RequestURLDecoder looks at the incoming request. If it is a multipart/form-data POST request, it removes the DefaultRequestHandler from the pipeline, otherwise the FileUploadHandler.
This works in the unit test RestExpressTest.shouldUploadFile() but not in a production environment.
A pipeline is created for each connection from the browser. These connections are re-used for further requests (keep-alive).
Any GET request in a keep-alive connection removes the FileUploadHandler from the pipeline. It is not put back if a file upload request is processed later. Therefore, the file upload request just seems to hang because it does not produce any response.
And vice versa, any file upload request removes the DefaultRequestHandler from the pipeline, so later requests can not be processed by it.
The
RequestURLDecoderlooks at the incoming request. If it is amultipart/form-dataPOST request, it removes theDefaultRequestHandlerfrom the pipeline, otherwise theFileUploadHandler.This works in the unit test
RestExpressTest.shouldUploadFile()but not in a production environment.A pipeline is created for each connection from the browser. These connections are re-used for further requests (keep-alive).
Any GET request in a keep-alive connection removes the
FileUploadHandlerfrom the pipeline. It is not put back if a file upload request is processed later. Therefore, the file upload request just seems to hang because it does not produce any response.And vice versa, any file upload request removes the
DefaultRequestHandlerfrom the pipeline, so later requests can not be processed by it.