In Http11Processor.java while (started && !error && keepAlive) { // Parsing the request header try { if (!disableUploadTimeout && keptAlive) { if (keepAliveTimeout > 0) { socket.setSoTimeout(keepAliveTimeout); } else if (soTimeout > 0) { socket.setSoTimeout(soTimeout); } } inputBuffer.parseRequestLine(); request.setStartTime(System.currentTimeMillis()); keptAlive = true; if (!disableUploadTimeout) { socket.setSoTimeout(timeout); } disableUploadTimeout - This flag allows the servlet container to use a different, longer connection timeout while a servlet is being executed, which in the end allows either the servlet a longer amount of time to complete its execution, or a longer timeout during data upload. If not specified, this attribute is set to "true". The code above is waiting on a new Http Request and precedes the servlet processing logic. It seems odd to me that I must set disableTimeout to false to get my keepAliveTimeout set. To set keepalivetimout, I must implicitely enable upload timeout whether I need it or not. It seems to me that the disableTimeout is unneccessary in the following line if (!disableUploadTimeout && keptAlive) { Do you agree with this? Thanks for the insight
Looks reasonable to me. I have made the change in trunk and proposed it for 6.0.x. There is always a chance, particularly with the connector code, that I have missed a use case that explains why this is so. If that is the case, I am sure one of my fellow committers will point it out.
Hi Mark, Thanks. I agree with your assessment of unintended consequences. The location in such well exercised code does make one pause. I am a newbie to this process. Do you have information as to how I can look at the modification in the trunk? Regards Doug
Best to keep an eye on the tomcat dev list. Details here: http://tomcat.apache.org/lists.html If you aren't already subscribed to the dev list, the commit message an be found in one of the many archives such as http://markmail.org/message/f744kl4i6bkruh5i
This has been fixed in 6.0.x and will be included in 6.0.19 onwards.