Author: markt
Date: Thu Feb 14 10:43:31 2013
New Revision: 1446110
URL: http://svn.apache.org/r1446110
Log:
Ensure request start time for HTTO NIO connector is measured correctly.
Modified:
tomcat/tc7.0.x/trunk/ (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/coyote/Request.java
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
Merged /tomcat/trunk:r1446108
Modified: tomcat/tc7.0.x/trunk/java/org/apache/coyote/Request.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/Request.java?rev=1446110&r1=1446109&r2=1446110&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/coyote/Request.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/coyote/Request.java Thu Feb 14
10:43:31 2013
@@ -506,6 +506,8 @@ public final class Request {
remoteUser.recycle();
authType.recycle();
attributes.clear();
+
+ startTime = -1;
}
// -------------------- Info --------------------
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java?rev=1446110&r1=1446109&r2=1446110&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
(original)
+++
tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
Thu Feb 14 10:43:31 2013
@@ -937,7 +937,12 @@ public abstract class AbstractHttp11Proc
response.setStatus(503);
error = true;
} else {
- request.setStartTime(System.currentTimeMillis());
+ // Make sure that connectors that are non-blocking during
+ // header processing (NIO) only set the start time the
first
+ // time a request is processed.
+ if (request.getStartTime() < 0) {
+ request.setStartTime(System.currentTimeMillis());
+ }
keptAlive = true;
// Set this every time in case limit has been changed via
JMX
request.getMimeHeaders().setLimit(endpoint.getMaxHeaderCount());
Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1446110&r1=1446109&r2=1446110&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Thu Feb 14 10:43:31 2013
@@ -54,6 +54,16 @@
issues to not "pop up" wrt. others).
-->
<section name="Tomcat 7.0.38 (markt)">
+ <subsection name="Catalina">
+ <changelog>
+ <fix>
+ Ensure that the request start time (used by the access log valve to
+ calculate request processing time) is correctly recorded for the HTTP
+ NIO connector. In some cases the request processing time may have been
+ longer than that recorded. (markt)
+ </fix>
+ </changelog>
+ </subsection>
<subsection name="Web applications">
<changelog>
<fix>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]