DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=41322>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=41322 Summary: http chunked encoding missing chunk length Product: Tomcat 5 Version: 5.5.17 Platform: PC OS/Version: other Status: NEW Severity: normal Priority: P2 Component: Connector:HTTP AssignedTo: tomcat-dev@jakarta.apache.org ReportedBy: [EMAIL PROTECTED] I'm working on a large project using JBOSS 4.0.4GA (which bundles Tomcat 5.5.17) and we've been experiencing intermittent loss of http requests. For example, occasionally a click on a submit button sends off a request to the server which completes successfully but the response is never displayed in the browser. What happens then depends on the browser; Firefox just remains on the original page while IE shows an error page. This really stuffs up Selenium automated tests, and is a user issue too - even in Firefox, as we use javascript to disable the submit button after first use to prevent double-submits :=(. This is reproduceable with Firefox 1.5 , Firefox 2.0 and IE6 on Windows, and Firefox 1.5 on Linux, so I'm fairly sure it isn't a browser-side issue. It's also reproduceable within the work environment and in my home system so it's not likely to be a network issue. It also happens with browser and server on same machine. The problem appears to also occur for GET requests on things like icons, css, javascript referenced from HTML pages. Just clicking the "search" button on one of the webapp screens repeatedly eventually causes the problem. About every 100 clicks or so, an icon will not be present, or styles will be missing, or the jscookmenu menu will display as a table due to the javascript not being loaded. However the responses to POST requests are the ones more frequently hit. I've tried to isolate a smaller test case but haven't yet succeeded, and our whole app cannot be posted for debugging, sorry. I've used Wireshark (aka Ethereal) to log network packets, and it looks to me like Tomcat is occasionally failing to send a chunk-length field when returning a chunked response, causing the browser to drop the connection and ignore the response. I *suspect* that the "intermittent" part is related to the maxKeepAliveRequests property, as: (a) the problem occurs more frequently when I set maxKeepAliveRequests to a low value (eg 5). (b) the wireshark logs I have always show a "Connection: close" header on those requests that also have what I think are bad chunked encoding. I've checked bugzilla and can't find a report that seems related to this. I've also checked the commit history for directory http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11 and cannot see anything relevant since the 5.5.17 release (r394159) so presume it isn't fixed in any later release than the one that comes with JBoss 4.0.4GA. Files focus-hang-1.pcap and focus-hang-3.pcap show two examples of the problem; these can be loaded in Wireshark/Ethereal to view the logged packets. In these logs the machine running the browser is 10.1.1.8 (Firefox 1.5 on Ubuntu Linux), and the machine running JBoss is 10.1.1.3 (Windows XP). Note that I'm not an expert in raw HTTP protocol, so may have misunderstood something here; any correction is very welcome. The jboss logs on the server show no problems. Here's a brief rundown for network capture file "focus-hang-1.pcap". First, a good response example from this file: packet 39: * start of a "good" response. Note, however that header "Transfer-Encoding: chunked" is emitted twice(?). Transfer-encoding: chunked\r\n ... Transfer-encoding: chunked\r\n \r\n 2000\r\n (chunk size) (html data starts) packet 49: See end of packet for next chunk size marker (2000) packet 74: towards end, see "\r\n0\r\n", which is a zero-size chunk, ie marks the end of the http response. Now a bad one: Packet 473: start of an HTTP Post request from the browser packet 474: server acks 473 packet 475: rest of post request packet 476: server acks 475 packet 477: start of (bad) response. * Transfer-encoding: chunked is present (but only once) * Connection: close is present * html data starts without any chunk length field. At packet 493, the client starts sending RST packets; I presume because the browser code has closed the socket after encountering errors processing the input data. For file focus-hang-3.pcap, the bad response starts at packet 969. Any comments/workarounds/etc would be very welcome. Even "yes I've seen this too" would be nice; it's a major issue on a pretty large project. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]