You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by mi...@apache.org on 2019/10/23 14:23:27 UTC
[tomcat] branch BZ-63835/9.0.x updated (a5e3e1d -> 38fdae1)
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a change to branch BZ-63835/9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git.
discard a5e3e1d Properly determine requests left on a "keepAlive" connection
discard f903e1f First draft
add db7e2d2 Further align complete()/dispatch() if called during async I/O
add 71389c0 asyncStarted should be false once complete/dispatch in onTimeout
add 02b865c asyncStarted should be false once complete/dispatch in onError
add 8e94406 63765: Properly mark container as FAILED when a JVM error occurs on stop
add 4892eda Update to Tomcat 9.0.27
add 44a50ce Add test case for bug 63816
add 85289c3 Add debug log messages for the triggering of async listener events
add 327c553 Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63816 async errors
add 302b06b Fix debug message formatting
add a80693f Expand test for https://bz.apache.org/bugzilla/show_bug.cgi?id=63816
add b0376a2 Refactor
add 0a7deb5 Refactor
add a730395 Remove an illegal state transition
add 8d4d663 Hack to fix fialing test
add e7988cc Refactor the unit test to avoid race conditions
add 339f910 Fix BZ number
add 101ac39 Refactor Vary parser to the more generic TokenList parser
add 7c913da Add a case sensitive / insensitive option to the token list parser
add 11dee21 Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63824
add c76d9f3 Simplify on the grounds all tokens of interest are case-insensitive
add 4dd08ae Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63825
add c298138 Remove unused String
add 3d73dfc Fix possible NPE with excessive header size
add b641633 Update state definitions and associated diagram (now a lot simpler)
add b8cc215 Minor optimisation - add new line to access log message outside the sync
add 46ebe8b Additional fix for https://bz.apache.org/bugzilla/show_bug.cgi?id=63825
add e3f18d5 Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63826
add fe11123 Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63815
add d252ad8 Update Korean translations
add fc5ddda Made some variable names more consistent with the other parts.
add 386da63 Merge pull request #217 from euske/master
add c41fe3b Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63829
add a9ac9c0 Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63830
new 38fdae1 BZ 63835: Add support for Keep-Alive header
This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version. This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:
* -- * -- B -- O -- O -- O (a5e3e1d)
\
N -- N -- N refs/heads/BZ-63835/9.0.x (38fdae1)
You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.
Any revisions marked "omit" are not gone; other references still
refer to them. Any revisions marked "discard" are gone forever.
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
bin/catalina.sh | 16 +-
bin/daemon.sh | 4 +-
bin/tool-wrapper.sh | 2 +-
build.xml | 4 +
java/javax/servlet/GenericServlet.java | 6 +-
.../org/apache/catalina/core/AsyncContextImpl.java | 12 +
.../apache/catalina/core/LocalStrings.properties | 4 +
.../catalina/filters/AddDefaultCharsetFilter.java | 12 +-
.../membership/cloud/CloudMembershipService.java | 2 +-
java/org/apache/catalina/util/LifecycleBase.java | 2 +-
.../org/apache/catalina/valves/AccessLogValve.java | 2 +-
java/org/apache/coyote/AbstractProcessor.java | 17 +-
java/org/apache/coyote/AsyncStateMachine.java | 274 +++++++--------
java/org/apache/coyote/CompressionConfig.java | 28 +-
java/org/apache/coyote/LocalStrings.properties | 3 +-
java/org/apache/coyote/LocalStrings_fr.properties | 1 -
java/org/apache/coyote/LocalStrings_ja.properties | 1 -
java/org/apache/coyote/LocalStrings_ko.properties | 1 -
java/org/apache/coyote/http11/Constants.java | 8 +
java/org/apache/coyote/http11/Http11Processor.java | 90 ++---
java/org/apache/jasper/JspCompilationContext.java | 7 +-
java/org/apache/jasper/compiler/Generator.java | 4 +-
java/org/apache/tomcat/util/buf/CharChunk.java | 4 +-
.../tomcat/util/compat/LocalStrings_ko.properties | 2 +
java/org/apache/tomcat/util/http/ResponseUtil.java | 4 +-
.../util/http/parser/{Vary.java => TokenList.java} | 39 ++-
java/org/apache/tomcat/util/http/parser/Vary.java | 34 +-
.../apache/tomcat/util/net/SocketWrapperBase.java | 6 +-
.../util/security/ConcurrentMessageDigest.java | 6 +-
modules/owb/pom.xml | 2 +-
res/tomcat-maven/pom.xml | 2 +-
.../apache/catalina/core/TestAsyncContextImpl.java | 221 +++++++++++-
.../core/TestAsyncContextStateChanges.java | 371 +++++++++++++++++++++
test/org/apache/coyote/http2/TestHttp2Limits.java | 20 +-
.../parser/{TestVary.java => TestTokenList.java} | 9 +-
webapps/docs/changelog.xml | 49 +++
36 files changed, 933 insertions(+), 336 deletions(-)
copy java/org/apache/tomcat/util/http/parser/{Vary.java => TokenList.java} (57%)
create mode 100644 test/org/apache/catalina/core/TestAsyncContextStateChanges.java
rename test/org/apache/tomcat/util/http/parser/{TestVary.java => TestTokenList.java} (93%)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[tomcat] 01/01: BZ 63835: Add support for Keep-Alive header
Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a commit to branch BZ-63835/9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 38fdae10298cfd239e25428319522b0c8ae70087
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Wed Oct 23 15:37:42 2019 +0200
BZ 63835: Add support for Keep-Alive header
---
java/org/apache/coyote/http11/Http11Processor.java | 22 ++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)
diff --git a/java/org/apache/coyote/http11/Http11Processor.java b/java/org/apache/coyote/http11/Http11Processor.java
index 7be52d0..262cc8c 100644
--- a/java/org/apache/coyote/http11/Http11Processor.java
+++ b/java/org/apache/coyote/http11/Http11Processor.java
@@ -915,8 +915,26 @@ public class Http11Processor extends AbstractProcessor {
headers.addValue(Constants.CONNECTION).setString(
Constants.CLOSE);
}
- } else if (!http11 && !getErrorState().isError()) {
- headers.addValue(Constants.CONNECTION).setString(Constants.KEEPALIVE);
+ } else if (!getErrorState().isError()) {
+ if (!http11) {
+ headers.addValue(Constants.CONNECTION).setString(Constants.KEEPALIVE);
+ }
+
+ boolean connectionKeepAlivePresent =
+ isConnectionToken(request.getMimeHeaders(), Constants.KEEPALIVE);
+
+ if (connectionKeepAlivePresent) {
+ int keepAliveTimeout = protocol.getKeepAliveTimeout();
+
+ if (keepAliveTimeout > 0) {
+ String value = "timeout=" + keepAliveTimeout / 1000L;
+ headers.setValue("Keep-Alive").setString(value);
+ }
+
+ if (http11) {
+ headers.addValue(Constants.CONNECTION).setString(Constants.KEEPALIVE);
+ }
+ }
}
// Add server header
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org