https://issues.apache.org/bugzilla/show_bug.cgi?id=51058
Summary: AsyncContext.setTimeout() doesn't work as described
for Async requests
Product: Tomcat 7
Version: 7.0.11
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Servlet & JSP API
AssignedTo: [email protected]
ReportedBy: [email protected]
Created an attachment (id=26884)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=26884)
Suggested patch
The Javadoc for javax.servlet.AsyncContext.setTimeout() and
javax.servlet.AsyncContext.getTimeout() states that:
"A timeout value of zero or less indicates no timeout."
However, this doesn't seem to be the case. A timeout value of zero or less will
result in an immediate timeout.
Looking through the code, I think the timeout is enforced in
org.apache.tomcat.util.net.AprEndpoint.AsyncTimeout.run() or
org.apache.tomcat.util.net.JIoEndpoint.AsyncTimeout.run().
I've attached a patch which changes the timeout logic. I believe
org.apache.tomcat.util.net.NioEndpoint.timeout() also needs a change, but that
one's not as clear to me.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]