[Bug 54456] ChunkedInputFilter returning EOF when client closes connection without sending end chunk
https://issues.apache.org/bugzilla/show_bug.cgi?id=54456 --- Comment #13 from Konstantin Kolinko knst.koli...@gmail.com --- Fixed in Tomcat 6 by r1476544 , will be in 6.0.37. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 54456] ChunkedInputFilter returning EOF when client closes connection without sending end chunk
https://issues.apache.org/bugzilla/show_bug.cgi?id=54456 --- Comment #12 from Konstantin Kolinko knst.koli...@gmail.com --- I proposed backport of r1443430 to 6.0. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 54456] ChunkedInputFilter returning EOF when client closes connection without sending end chunk
https://issues.apache.org/bugzilla/show_bug.cgi?id=54456 --- Comment #7 from Mark Thomas ma...@apache.org --- (In reply to comment #5) On a thought, it would be better to use org.apache.catalina.connector.ClientAbortException or a generic IOException. ClientAbortException is a disallowed import for org.apache.coyote. It will have to be IOException. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 54456] ChunkedInputFilter returning EOF when client closes connection without sending end chunk
https://issues.apache.org/bugzilla/show_bug.cgi?id=54456 Mark Thomas ma...@apache.org changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #8 from Mark Thomas ma...@apache.org --- Fixed in trunk and 7.0.x and will be included in 7.0.37 onwards. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 54456] ChunkedInputFilter returning EOF when client closes connection without sending end chunk
https://issues.apache.org/bugzilla/show_bug.cgi?id=54456 --- Comment #9 from Sudhan Moghe sudhan.mo...@gmail.com --- (In reply to comment #8) Fixed in trunk and 7.0.x and will be included in 7.0.37 onwards. 7.0.37 or 7.0.36? Fix in 7.0.36 (if possible) would help a lot. We are already in production and can't use dev build. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 54456] ChunkedInputFilter returning EOF when client closes connection without sending end chunk
https://issues.apache.org/bugzilla/show_bug.cgi?id=54456 --- Comment #10 from Mark Thomas ma...@apache.org --- Which part of will be included in 7.0.37 onwards was unclear? -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 54456] ChunkedInputFilter returning EOF when client closes connection without sending end chunk
https://issues.apache.org/bugzilla/show_bug.cgi?id=54456 --- Comment #11 from Sudhan Moghe sudhan.mo...@gmail.com --- Sorry for bothering you. I was just confirming as current release is 7.0.35. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 54456] ChunkedInputFilter returning EOF when client closes connection without sending end chunk
https://issues.apache.org/bugzilla/show_bug.cgi?id=54456 --- Comment #5 from Konstantin Kolinko knst.koli...@gmail.com --- (In reply to comment #4) throw new EOFException() would be better. On a thought, it would be better to use org.apache.catalina.connector.ClientAbortException or a generic IOException. It is abnormal abort of connection by the client. It is not a proper end of stream. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 54456] ChunkedInputFilter returning EOF when client closes connection without sending end chunk
https://issues.apache.org/bugzilla/show_bug.cgi?id=54456 --- Comment #6 from Sudhan Moghe sudhan.mo...@gmail.com --- Tested with protocol=HTTP/1.1 and async-supportedfalse/async-supported Took latest code from trunk and then added following debug statements to ChunkedInputFilter. if (pos = lastValid) { int readBytes = readBytes(); if (readBytes = 0){ System.out.println(ChunkedInputFilter.doRead()1 readBytes returned : + readBytes); } } if (remaining (lastValid - pos)) { result = lastValid - pos; System.out.println(ChunkedInputFilter.doRead()2 result: + result + remaining: + remaining + lastValid: + lastValid + pos: + pos); Output on console ChunkedInputFilter.doRead()1 readBytes returned : -1 ChunkedInputFilter.doRead()2 result: -1 remaining: 8192 lastValid: 334 pos: 335 Method returns -1, which is treated as normal EOF. And application ends up processing incomplete data. return -1 won't do as that is what is being returned. throw new EOFException(Unexpected end of stream while reading chunk body); or throw new org.apache.catalina.connector.ClientAbortException() looks appropriate. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 54456] ChunkedInputFilter returning EOF when client closes connection without sending end chunk
https://issues.apache.org/bugzilla/show_bug.cgi?id=54456 Konstantin Kolinko knst.koli...@gmail.com changed: What|Removed |Added Status|NEEDINFO|NEW --- Comment #4 from Konstantin Kolinko knst.koli...@gmail.com --- The following lines in ChunkedInputFilter.java (162-164 in trunk) if (pos = lastValid) { readBytes(); } is the only place in this file where the return value of readBytes() is not checked. Looking at the code, if the method returns -1 then (lastValid - pos) will be -1 and it will proceed with chunk.setBytes(buf, pos, result);, which seems a wrong thing to do in such a case. I have not tested what is the actual behaviour here, but an explicit return -1 or throw new EOFException() would be better. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 54456] ChunkedInputFilter returning EOF when client closes connection without sending end chunk
https://issues.apache.org/bugzilla/show_bug.cgi?id=54456 --- Comment #3 from Sudhan Moghe sudhan.mo...@gmail.com --- I found the issue after we switched to protocol=HTTP/1.1. But I have tested my patch with HTTP/1.1 as well as NIO connector. I am getting EOFException(Unexpected end of stream while reading chunk body) with both. Client is sending 8kB chunks. The test cases that are failing send around 18mB data before closing connection. Why I was not getting EOF in my servlet with NIO connector is something I need to check. ChunkedInputFilter is returning -1 for sure. I wanted to check that before giving update here but not getting time. Will check and give details as soon as possible. May be some time next week. One sure way of reproducing the issue is setting chunk size as 200 and sending only 100 bytes and then closing connection. My test case is not doing that and why is it happening in my case is something I need to check. I am sending complete 8kB chunks from client. In my case it should fail while reading header (which is handled properly). -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 54456] ChunkedInputFilter returning EOF when client closes connection without sending end chunk
https://issues.apache.org/bugzilla/show_bug.cgi?id=54456 --- Comment #1 from Mark Thomas ma...@apache.org --- Which HTTP connector are you using? I'm having trouble reproducing this. I'm not against the patch but I'd like to understand what is going on first. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 54456] ChunkedInputFilter returning EOF when client closes connection without sending end chunk
https://issues.apache.org/bugzilla/show_bug.cgi?id=54456 Mark Thomas ma...@apache.org changed: What|Removed |Added Status|NEW |NEEDINFO Severity|critical|normal --- Comment #2 from Mark Thomas ma...@apache.org --- Restoring the severity to something sensible. Need requested information to progress this. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 54456] ChunkedInputFilter returning EOF when client closes connection without sending end chunk
https://issues.apache.org/bugzilla/show_bug.cgi?id=54456 Sudhan Moghe sudhan.mo...@gmail.com changed: What|Removed |Added OS||All Severity|normal |critical -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org