I'm having trouble with upload one audio file >10s and gives me this error:
WARN:oejh.HttpParser:qtp1359061041-19: badMessage: java.lang.IllegalStateException: too much data after closed for HttpChannelOverHttp@7fd0cbe{r=5,a=IDLE,uri=-}
If I upload audio file <10s it goes ok.
I searched on google, but I couldn't find any solution for this. There's any solution for this?
I'm using Cordova 3.3.0, and the problem was on the upload. The code below solved my case:
var options = new FileUploadOptions();
options.fileKey="file";
options.fileName=name;
options.mimeType = "audio/amr";
options.headers = {
Connection: "close"
}
options.chunkedMode = false;
From why jetty keep giving me the too much data after closed
(Will try my best to explain). The connection must be closed after do another connection and request. For example, my upload keep reusing the same request and overflow the request and give me the message. So basically, for each request, must close and open new one.
For precaution, I made changes on jetty.xml
<Set name="outputBufferSize"><Property name="jetty.output.buffer.size" default="65536" /></Set>
<Set name="requestHeaderSize"><Property name="jetty.request.header.size" default="16384" /></Set>
<Set name="responseHeaderSize"><Property name="jetty.response.header.size" default="16384" /></Set>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With