This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new a4030ccb3c Align code with 10.1.x
a4030ccb3c is described below
commit a4030ccb3c70c65c4fb5b6c857127df16a7e15d6
Author: Mark Thomas <[email protected]>
AuthorDate: Mon Sep 29 09:00:34 2025 +0100
Align code with 10.1.x
---
java/org/apache/coyote/http11/Http11InputBuffer.java | 5 ++---
java/org/apache/coyote/http2/Stream.java | 4 +---
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/java/org/apache/coyote/http11/Http11InputBuffer.java
b/java/org/apache/coyote/http11/Http11InputBuffer.java
index 9903301011..28d305f321 100644
--- a/java/org/apache/coyote/http11/Http11InputBuffer.java
+++ b/java/org/apache/coyote/http11/Http11InputBuffer.java
@@ -343,8 +343,6 @@ public class Http11InputBuffer implements InputBuffer,
ApplicationBufferHandler
wrapper.setReadTimeout(keepAliveTimeout);
}
if (!fill(false)) {
- // A read is pending, so no longer in initial state
- parsingRequestLinePhase = 1;
return false;
}
// At least one byte of the request has been received.
@@ -366,7 +364,8 @@ public class Http11InputBuffer implements InputBuffer,
ApplicationBufferHandler
}
// Set the start time once we start reading data (even if it is
// just skipping blank lines)
- if (request.getStartTime() < 0) {
+ if (parsingRequestLinePhase == 0) {
+ parsingRequestLinePhase = 1;
request.setStartTime(System.currentTimeMillis());
}
chr = byteBuffer.get();
diff --git a/java/org/apache/coyote/http2/Stream.java
b/java/org/apache/coyote/http2/Stream.java
index ce7d9e50cd..36c430271c 100644
--- a/java/org/apache/coyote/http2/Stream.java
+++ b/java/org/apache/coyote/http2/Stream.java
@@ -166,9 +166,7 @@ class Stream extends AbstractNonZeroStream implements
HeaderEmitter {
this.coyoteResponse.setOutputBuffer(http2OutputBuffer);
this.coyoteRequest.setResponse(coyoteResponse);
this.coyoteRequest.protocol().setString("HTTP/2.0");
- if (this.coyoteRequest.getStartTime() < 0) {
- this.coyoteRequest.setStartTime(System.currentTimeMillis());
- }
+ this.coyoteRequest.setStartTime(System.currentTimeMillis());
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]