Re: March releases?
ср, 9 мар. 2022 г. в 00:24, Mark Thomas : > > Hi all, > > I know I suggested skipping the March releases but I'd like to revisit > that in light of two things. > > 1. The concurrency issue I fixed earlier today. [1] > It has been present for a long time and we haven't had any bug reports. > However, it just looks like a random timeout so users might not report it. > My main motivation is that a customer at $dayjob is affected by this so > I'd like to get them onto a proper release rather than the snapshot they > are currently using. > > 2. The fix for the regression caused by BZ 65757 [2] > No hard evidence for this one, just a general uneasiness about > regressions in general. > > So, thoughts on a set of releases for March? 1. The following may be a bug to be addressed before a release: See thread "Many IllegalStateException when using http2 protocol" - I wonder why the code mentioned there throws an ISE instead of an IOException (end of stream exception) when writing to a closed stream. That method declares that it throws an IOException. I commented in that thread. It is not in BZ yet. 2. +1 for rolling a release. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: March releases?
On Tue, Mar 8, 2022 at 10:25 PM Mark Thomas wrote: > > Hi all, > > I know I suggested skipping the March releases but I'd like to revisit > that in light of two things. > > 1. The concurrency issue I fixed earlier today. [1] > It has been present for a long time and we haven't had any bug reports. > However, it just looks like a random timeout so users might not report it. > My main motivation is that a customer at $dayjob is affected by this so > I'd like to get them onto a proper release rather than the snapshot they > are currently using. > > 2. The fix for the regression caused by BZ 65757 [2] > No hard evidence for this one, just a general uneasiness about > regressions in general. > > So, thoughts on a set of releases for March? No problem, doing a release to fix things is never a bad thing. Rémy > Mark > > > [1] > https://github.com/apache/tomcat/commit/a60528617e512330f91553e925d50a6c34016dd4 > > [2] > https://github.com/apache/tomcat/commit/2739565fa5286623e8bb31823770595de14b6370 > > - > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
March releases?
Hi all, I know I suggested skipping the March releases but I'd like to revisit that in light of two things. 1. The concurrency issue I fixed earlier today. [1] It has been present for a long time and we haven't had any bug reports. However, it just looks like a random timeout so users might not report it. My main motivation is that a customer at $dayjob is affected by this so I'd like to get them onto a proper release rather than the snapshot they are currently using. 2. The fix for the regression caused by BZ 65757 [2] No hard evidence for this one, just a general uneasiness about regressions in general. So, thoughts on a set of releases for March? Mark [1] https://github.com/apache/tomcat/commit/a60528617e512330f91553e925d50a6c34016dd4 [2] https://github.com/apache/tomcat/commit/2739565fa5286623e8bb31823770595de14b6370 - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] 02/02: Revert "Temporary workaround for broken DigiCert ONE REST API"
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git commit 1083bce76d6b6bff26fd388dfc3933ef18ea48c9 Author: Mark Thomas AuthorDate: Tue Mar 8 16:42:46 2022 + Revert "Temporary workaround for broken DigiCert ONE REST API" This reverts commit 7c54e369e87f1eedd50e42f895c2b0cd058e30b8. --- build.properties.default | 12 ++-- build.xml| 2 -- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/build.properties.default b/build.properties.default index fd4ed58..64cb22e 100644 --- a/build.properties.default +++ b/build.properties.default @@ -84,19 +84,11 @@ gpg.exec=/path/to/gpg # Code signing of Windows installer # See https://infra.apache.org/digicert-use.html for setup instructions do.codesigning=false -#codesigning.alias=Tomcat-PMC-cert-2021-11 +codesigning.alias=Tomcat-PMC-cert-2021-11 codesigning.digest=SHA-512 -#codesigning.storetype=DIGICERTONE +codesigning.storetype=DIGICERTONE # Set codesigning.storepass in build.properties with the following syntax #codesigning.storepass=|/path/to/Certificate_pkcs12.p12| -# Once DigiCert fix the broken REST API -# - Uncomment alias & storetype above -# - Remove the four lines below -# - Remove the keystore field from build.xml -codesigning.keystore=${user.home}/.digicertone/pkcs11properties.cfg -codesigning.storepass=NONE -codesigning.storetype=PKCS11 -codesigning.alias=Tomcat-PMC-key-2021-11 # - Settings to use when downloading files - trydownload.httpusecaches=true diff --git a/build.xml b/build.xml index 39a8b32..8427711 100644 --- a/build.xml +++ b/build.xml @@ -2186,7 +2186,6 @@ skip.installer property in build.properties" /> unless="skip.installer" depends="-installer-create-uninstaller,setup-jsign" if="${do.codesigning}"> description="Builds and optionally signs the Windows installer" depends="-installer,setup-jsign" if="${do.codesigning}" >
[tomcat] 01/02: Fix potential concurrency issue.
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git commit b3e76d3cdb5aab462df1d51b8048ff63829eebd1 Author: Mark Thomas AuthorDate: Tue Mar 8 16:27:03 2022 + Fix potential concurrency issue. If the request is split across multiple packets and those packets are processed in rapid succession then it is possible that subsequent packets see the wrong value for readComplete and register the socket for a further read rather than processing the request. --- java/org/apache/coyote/http11/Http11Processor.java | 4 ++-- webapps/docs/changelog.xml | 5 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/java/org/apache/coyote/http11/Http11Processor.java b/java/org/apache/coyote/http11/Http11Processor.java index 6751f74..eafd286 100644 --- a/java/org/apache/coyote/http11/Http11Processor.java +++ b/java/org/apache/coyote/http11/Http11Processor.java @@ -112,13 +112,13 @@ public class Http11Processor extends AbstractProcessor { * Flag used to indicate that the socket should be kept open (e.g. for keep * alive or send file. */ -protected boolean openSocket = false; +protected volatile boolean openSocket = false; /** * Flag that indicates if the request headers have been completely read. */ -protected boolean readComplete = true; +protected volatile boolean readComplete = true; /** * HTTP/1.1 flag. diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 4e0c0b5..d50cfa0 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -127,6 +127,11 @@ when user code was doing sequential operations in a single thread. Test case code submitted by Istvan Szekely. (remm) + +Fix potential thread-safety issue that could cause HTTP/1.1 request +processing to wait, and potentially timeout, waiting for additional +data when the full request has been received. (markt) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch 8.5.x updated (3778312 -> 1083bce)
This is an automated email from the ASF dual-hosted git repository. markt pushed a change to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git. from 3778312 Improve comments. Remove unnecessary code. new b3e76d3 Fix potential concurrency issue. new 1083bce Revert "Temporary workaround for broken DigiCert ONE REST API" The 2 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: build.properties.default | 12 ++-- build.xml | 2 -- java/org/apache/coyote/http11/Http11Processor.java | 4 ++-- webapps/docs/changelog.xml | 5 + 4 files changed, 9 insertions(+), 14 deletions(-) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch 10.0.x updated: Revert "Temporary workaround for broken DigiCert ONE REST API"
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 10.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/10.0.x by this push: new 86ed9e1 Revert "Temporary workaround for broken DigiCert ONE REST API" 86ed9e1 is described below commit 86ed9e1b2be954a2edfccfec43d90323ebf8432c Author: Mark Thomas AuthorDate: Tue Mar 8 16:42:46 2022 + Revert "Temporary workaround for broken DigiCert ONE REST API" This reverts commit 7c54e369e87f1eedd50e42f895c2b0cd058e30b8. --- build.properties.default | 12 ++-- build.xml| 2 -- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/build.properties.default b/build.properties.default index 50a3b15..268a77d 100644 --- a/build.properties.default +++ b/build.properties.default @@ -81,19 +81,11 @@ gpg.exec=/path/to/gpg # Code signing of Windows installer # See https://infra.apache.org/digicert-use.html for setup instructions do.codesigning=false -#codesigning.alias=Tomcat-PMC-cert-2021-11 +codesigning.alias=Tomcat-PMC-cert-2021-11 codesigning.digest=SHA-512 -#codesigning.storetype=DIGICERTONE +codesigning.storetype=DIGICERTONE # Set codesigning.storepass in build.properties with the following syntax #codesigning.storepass=|/path/to/Certificate_pkcs12.p12| -# Once DigiCert fix the broken REST API -# - Uncomment alias & storetype above -# - Remove the four lines below -# - Remove the keystore field from build.xml -codesigning.keystore=${user.home}/.digicertone/pkcs11properties.cfg -codesigning.storepass=NONE -codesigning.storetype=PKCS11 -codesigning.alias=Tomcat-PMC-key-2021-11 # - Settings to use when downloading files - trydownload.httpusecaches=true diff --git a/build.xml b/build.xml index d75b22b..cb0e971 100644 --- a/build.xml +++ b/build.xml @@ -2523,7 +2523,6 @@ skip.installer property in build.properties" /> unless="skip.installer" depends="-installer-create-uninstaller,setup-jsign" if="${do.codesigning}"> description="Builds and optionally signs the Windows installer" depends="-installer,setup-jsign" if="${do.codesigning}" >
[tomcat] branch main updated: Revert "Temporary workaround for broken DigiCert ONE REST API"
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/main by this push: new f50f3e3 Revert "Temporary workaround for broken DigiCert ONE REST API" f50f3e3 is described below commit f50f3e306fe649b6afa6b270dea518a9b1a3d239 Author: Mark Thomas AuthorDate: Tue Mar 8 16:42:46 2022 + Revert "Temporary workaround for broken DigiCert ONE REST API" This reverts commit 7c54e369e87f1eedd50e42f895c2b0cd058e30b8. --- build.properties.default | 12 ++-- build.xml| 2 -- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/build.properties.default b/build.properties.default index d5bdf0e..0d7e958 100644 --- a/build.properties.default +++ b/build.properties.default @@ -79,19 +79,11 @@ gpg.exec=/path/to/gpg # Code signing of Windows installer # See https://infra.apache.org/digicert-use.html for setup instructions do.codesigning=false -#codesigning.alias=Tomcat-PMC-cert-2021-11 +codesigning.alias=Tomcat-PMC-cert-2021-11 codesigning.digest=SHA-512 -#codesigning.storetype=DIGICERTONE +codesigning.storetype=DIGICERTONE # Set codesigning.storepass in build.properties with the following syntax #codesigning.storepass=|/path/to/Certificate_pkcs12.p12| -# Once DigiCert fix the broken REST API -# - Uncomment alias & storetype above -# - Remove the four lines below -# - Remove the keystore field from build.xml -codesigning.keystore=${user.home}/.digicertone/pkcs11properties.cfg -codesigning.storepass=NONE -codesigning.storetype=PKCS11 -codesigning.alias=Tomcat-PMC-key-2021-11 # - Settings to use when downloading files - trydownload.httpusecaches=true diff --git a/build.xml b/build.xml index fb5c56a..54cd5fd 100644 --- a/build.xml +++ b/build.xml @@ -2562,7 +2562,6 @@ skip.installer property in build.properties" /> unless="skip.installer" depends="-installer-create-uninstaller,setup-jsign" if="${do.codesigning}"> description="Builds and optionally signs the Windows installer" depends="-installer,setup-jsign" if="${do.codesigning}" >
[tomcat] branch 9.0.x updated: Revert "Temporary workaround for broken DigiCert ONE REST API"
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 4cc304f Revert "Temporary workaround for broken DigiCert ONE REST API" 4cc304f is described below commit 4cc304f67736802ea140721eabdf14f68c36b822 Author: Mark Thomas AuthorDate: Tue Mar 8 16:42:46 2022 + Revert "Temporary workaround for broken DigiCert ONE REST API" This reverts commit 7c54e369e87f1eedd50e42f895c2b0cd058e30b8. --- build.properties.default | 12 ++-- build.xml| 2 -- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/build.properties.default b/build.properties.default index cf437c4..6f14d4b 100644 --- a/build.properties.default +++ b/build.properties.default @@ -81,19 +81,11 @@ gpg.exec=/path/to/gpg # Code signing of Windows installer # See https://infra.apache.org/digicert-use.html for setup instructions do.codesigning=false -#codesigning.alias=Tomcat-PMC-cert-2021-11 +codesigning.alias=Tomcat-PMC-cert-2021-11 codesigning.digest=SHA-512 -#codesigning.storetype=DIGICERTONE +codesigning.storetype=DIGICERTONE # Set codesigning.storepass in build.properties with the following syntax #codesigning.storepass=|/path/to/Certificate_pkcs12.p12| -# Once DigiCert fix the broken REST API -# - Uncomment alias & storetype above -# - Remove the four lines below -# - Remove the keystore field from build.xml -codesigning.keystore=${user.home}/.digicertone/pkcs11properties.cfg -codesigning.storepass=NONE -codesigning.storetype=PKCS11 -codesigning.alias=Tomcat-PMC-key-2021-11 # - Settings to use when downloading files - trydownload.httpusecaches=true diff --git a/build.xml b/build.xml index 326d7b1..6e24ad4 100644 --- a/build.xml +++ b/build.xml @@ -2505,7 +2505,6 @@ skip.installer property in build.properties" /> unless="skip.installer" depends="-installer-create-uninstaller,setup-jsign" if="${do.codesigning}"> description="Builds and optionally signs the Windows installer" depends="-installer,setup-jsign" if="${do.codesigning}" >
[tomcat] branch 9.0.x updated: Fix potential concurrency issue.
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 5975de9 Fix potential concurrency issue. 5975de9 is described below commit 5975de9818244c8e967f2d22020948404d0547c2 Author: Mark Thomas AuthorDate: Tue Mar 8 16:27:03 2022 + Fix potential concurrency issue. If the request is split across multiple packets and those packets are processed in rapid succession then it is possible that subsequent packets see the wrong value for readComplete and register the socket for a further read rather than processing the request. --- java/org/apache/coyote/http11/Http11Processor.java | 4 ++-- webapps/docs/changelog.xml | 5 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/java/org/apache/coyote/http11/Http11Processor.java b/java/org/apache/coyote/http11/Http11Processor.java index 7aaf1f8..eb9199d 100644 --- a/java/org/apache/coyote/http11/Http11Processor.java +++ b/java/org/apache/coyote/http11/Http11Processor.java @@ -111,13 +111,13 @@ public class Http11Processor extends AbstractProcessor { * Flag used to indicate that the socket should be kept open (e.g. for keep * alive or send file. */ -private boolean openSocket = false; +private volatile boolean openSocket = false; /** * Flag that indicates if the request headers have been completely read. */ -private boolean readComplete = true; +private volatile boolean readComplete = true; /** * HTTP/1.1 flag. diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index ef55841..9f28ce2 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -127,6 +127,11 @@ when user code was doing sequential operations in a single thread. Test case code submitted by Istvan Szekely. (remm) + +Fix potential thread-safety issue that could cause HTTP/1.1 request +processing to wait, and potentially timeout, waiting for additional +data when the full request has been received. (markt) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch 10.0.x updated: Fix potential concurrency issue.
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 10.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/10.0.x by this push: new 54f8f8a Fix potential concurrency issue. 54f8f8a is described below commit 54f8f8a6b67246d2b34948567c40202d4b3b7251 Author: Mark Thomas AuthorDate: Tue Mar 8 16:27:03 2022 + Fix potential concurrency issue. If the request is split across multiple packets and those packets are processed in rapid succession then it is possible that subsequent packets see the wrong value for readComplete and register the socket for a further read rather than processing the request. --- java/org/apache/coyote/http11/Http11Processor.java | 4 ++-- webapps/docs/changelog.xml | 5 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/java/org/apache/coyote/http11/Http11Processor.java b/java/org/apache/coyote/http11/Http11Processor.java index 7bcdec6..0fa74b9 100644 --- a/java/org/apache/coyote/http11/Http11Processor.java +++ b/java/org/apache/coyote/http11/Http11Processor.java @@ -111,13 +111,13 @@ public class Http11Processor extends AbstractProcessor { * Flag used to indicate that the socket should be kept open (e.g. for keep * alive or send file. */ -private boolean openSocket = false; +private volatile boolean openSocket = false; /** * Flag that indicates if the request headers have been completely read. */ -private boolean readComplete = true; +private volatile boolean readComplete = true; /** * HTTP/1.1 flag. diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 877f47e..2a1c8f5 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -132,6 +132,11 @@ when user code was doing sequential operations in a single thread. Test case code submitted by Istvan Szekely. (remm) + +Fix potential thread-safety issue that could cause HTTP/1.1 request +processing to wait, and potentially timeout, waiting for additional +data when the full request has been received. (markt) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch main updated: Fix potential concurrency issue.
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/main by this push: new a605286 Fix potential concurrency issue. a605286 is described below commit a60528617e512330f91553e925d50a6c34016dd4 Author: Mark Thomas AuthorDate: Tue Mar 8 16:27:03 2022 + Fix potential concurrency issue. If the request is split across multiple packets and those packets are processed in rapid succession then it is possible that subsequent packets see the wrong value for readComplete and register the socket for a further read rather than processing the request. --- java/org/apache/coyote/http11/Http11Processor.java | 4 ++-- webapps/docs/changelog.xml | 5 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/java/org/apache/coyote/http11/Http11Processor.java b/java/org/apache/coyote/http11/Http11Processor.java index 623631a..4f82613 100644 --- a/java/org/apache/coyote/http11/Http11Processor.java +++ b/java/org/apache/coyote/http11/Http11Processor.java @@ -112,13 +112,13 @@ public class Http11Processor extends AbstractProcessor { * Flag used to indicate that the socket should be kept open (e.g. for keep * alive or send file. */ -private boolean openSocket = false; +private volatile boolean openSocket = false; /** * Flag that indicates if the request headers have been completely read. */ -private boolean readComplete = true; +private volatile boolean readComplete = true; /** * HTTP/1.1 flag. diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index aa6a32a..5f0850f 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -132,6 +132,11 @@ when user code was doing sequential operations in a single thread. Test case code submitted by Istvan Szekely. (remm) + +Fix potential thread-safety issue that could cause HTTP/1.1 request +processing to wait, and potentially timeout, waiting for additional +data when the full request has been received. (markt) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch 8.5.x updated: Improve comments. Remove unnecessary code.
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/8.5.x by this push: new 3778312 Improve comments. Remove unnecessary code. 3778312 is described below commit 37783122eca30e77b486136581bf757278c50aa4 Author: Mark Thomas AuthorDate: Tue Mar 8 15:51:42 2022 + Improve comments. Remove unnecessary code. --- java/org/apache/coyote/http11/Http11InputBuffer.java | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/java/org/apache/coyote/http11/Http11InputBuffer.java b/java/org/apache/coyote/http11/Http11InputBuffer.java index 2931f78..e66dc4c 100644 --- a/java/org/apache/coyote/http11/Http11InputBuffer.java +++ b/java/org/apache/coyote/http11/Http11InputBuffer.java @@ -845,8 +845,9 @@ public class Http11InputBuffer implements InputBuffer, ApplicationBufferHandler /** * Parse an HTTP header. * - * @return false after reading a blank line (which indicates that the - * HTTP header parsing is done + * @return One of {@link HeaderParseStatus#NEED_MORE_DATA}, + * {@link HeaderParseStatus#HAVE_MORE_HEADERS} or + * {@link HeaderParseStatus#DONE}. */ private HeaderParseStatus parseHeader() throws IOException { @@ -854,8 +855,7 @@ public class Http11InputBuffer implements InputBuffer, ApplicationBufferHandler // Read new bytes if needed if (byteBuffer.position() >= byteBuffer.limit()) { -if (!fill(false)) {// parse header -headerParsePos = HeaderParsePosition.HEADER_START; +if (!fill(false)) { return HeaderParseStatus.NEED_MORE_DATA; } } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch 9.0.x updated: Improve comments. Remove unnecessary code.
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 32e7fc0 Improve comments. Remove unnecessary code. 32e7fc0 is described below commit 32e7fc097672067333eedbd8669f4c929141e162 Author: Mark Thomas AuthorDate: Tue Mar 8 15:51:42 2022 + Improve comments. Remove unnecessary code. --- java/org/apache/coyote/http11/Http11InputBuffer.java | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/java/org/apache/coyote/http11/Http11InputBuffer.java b/java/org/apache/coyote/http11/Http11InputBuffer.java index 413a1c4..fd7b755 100644 --- a/java/org/apache/coyote/http11/Http11InputBuffer.java +++ b/java/org/apache/coyote/http11/Http11InputBuffer.java @@ -845,8 +845,9 @@ public class Http11InputBuffer implements InputBuffer, ApplicationBufferHandler /** * Parse an HTTP header. * - * @return false after reading a blank line (which indicates that the - * HTTP header parsing is done + * @return One of {@link HeaderParseStatus#NEED_MORE_DATA}, + * {@link HeaderParseStatus#HAVE_MORE_HEADERS} or + * {@link HeaderParseStatus#DONE}. */ private HeaderParseStatus parseHeader() throws IOException { @@ -854,8 +855,7 @@ public class Http11InputBuffer implements InputBuffer, ApplicationBufferHandler // Read new bytes if needed if (byteBuffer.position() >= byteBuffer.limit()) { -if (!fill(false)) {// parse header -headerParsePos = HeaderParsePosition.HEADER_START; +if (!fill(false)) { return HeaderParseStatus.NEED_MORE_DATA; } } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch 10.0.x updated: Improve comments. Remove unnecessary code.
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 10.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/10.0.x by this push: new 0bd0f93 Improve comments. Remove unnecessary code. 0bd0f93 is described below commit 0bd0f938a25e9a1950b0b73e5a19f66395313f69 Author: Mark Thomas AuthorDate: Tue Mar 8 15:51:42 2022 + Improve comments. Remove unnecessary code. --- java/org/apache/coyote/http11/Http11InputBuffer.java | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/java/org/apache/coyote/http11/Http11InputBuffer.java b/java/org/apache/coyote/http11/Http11InputBuffer.java index fd9d18d..6757e69 100644 --- a/java/org/apache/coyote/http11/Http11InputBuffer.java +++ b/java/org/apache/coyote/http11/Http11InputBuffer.java @@ -845,8 +845,9 @@ public class Http11InputBuffer implements InputBuffer, ApplicationBufferHandler /** * Parse an HTTP header. * - * @return false after reading a blank line (which indicates that the - * HTTP header parsing is done + * @return One of {@link HeaderParseStatus#NEED_MORE_DATA}, + * {@link HeaderParseStatus#HAVE_MORE_HEADERS} or + * {@link HeaderParseStatus#DONE}. */ private HeaderParseStatus parseHeader() throws IOException { @@ -854,8 +855,7 @@ public class Http11InputBuffer implements InputBuffer, ApplicationBufferHandler // Read new bytes if needed if (byteBuffer.position() >= byteBuffer.limit()) { -if (!fill(false)) {// parse header -headerParsePos = HeaderParsePosition.HEADER_START; +if (!fill(false)) { return HeaderParseStatus.NEED_MORE_DATA; } } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch main updated: Improve comments. Remove unnecessary code.
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/main by this push: new a2a0cdf Improve comments. Remove unnecessary code. a2a0cdf is described below commit a2a0cdf98cdbbf391c6568347a723f38e365f982 Author: Mark Thomas AuthorDate: Tue Mar 8 15:51:42 2022 + Improve comments. Remove unnecessary code. --- java/org/apache/coyote/http11/Http11InputBuffer.java | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/java/org/apache/coyote/http11/Http11InputBuffer.java b/java/org/apache/coyote/http11/Http11InputBuffer.java index fd9d18d..6757e69 100644 --- a/java/org/apache/coyote/http11/Http11InputBuffer.java +++ b/java/org/apache/coyote/http11/Http11InputBuffer.java @@ -845,8 +845,9 @@ public class Http11InputBuffer implements InputBuffer, ApplicationBufferHandler /** * Parse an HTTP header. * - * @return false after reading a blank line (which indicates that the - * HTTP header parsing is done + * @return One of {@link HeaderParseStatus#NEED_MORE_DATA}, + * {@link HeaderParseStatus#HAVE_MORE_HEADERS} or + * {@link HeaderParseStatus#DONE}. */ private HeaderParseStatus parseHeader() throws IOException { @@ -854,8 +855,7 @@ public class Http11InputBuffer implements InputBuffer, ApplicationBufferHandler // Read new bytes if needed if (byteBuffer.position() >= byteBuffer.limit()) { -if (!fill(false)) {// parse header -headerParsePos = HeaderParsePosition.HEADER_START; +if (!fill(false)) { return HeaderParseStatus.NEED_MORE_DATA; } } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch 8.5.x updated: Follow up to #479. Fix logic. Thanks to kkolinko review
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/8.5.x by this push: new ff54530 Follow up to #479. Fix logic. Thanks to kkolinko review ff54530 is described below commit ff54530284bcf4363743dbd6383361c2300c2884 Author: Mark Thomas AuthorDate: Tue Mar 8 10:57:33 2022 + Follow up to #479. Fix logic. Thanks to kkolinko review --- java/org/apache/catalina/connector/Response.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/org/apache/catalina/connector/Response.java b/java/org/apache/catalina/connector/Response.java index d0010bf..e0f320f 100644 --- a/java/org/apache/catalina/connector/Response.java +++ b/java/org/apache/catalina/connector/Response.java @@ -1362,7 +1362,7 @@ public class Response implements HttpServletResponse { // If no ROOT context is defined, the context can be null. // In this case, the default Tomcat values are assumed, but without // reference to org.apache.catalina.STRICT_SERVLET_COMPLIANCE. -boolean reqHasContext = context == null; +boolean reqHasContext = (context != null); String locationUri; // Relative redirects require HTTP/1.1 if (getRequest().getCoyoteRequest().getSupportsRelativeRedirects() && - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch 9.0.x updated: Follow up to #479. Fix logic. Thanks to kkolinko review
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 be81d3c Follow up to #479. Fix logic. Thanks to kkolinko review be81d3c is described below commit be81d3c6c089b3ff2c2c3346495332613b64950d Author: Mark Thomas AuthorDate: Tue Mar 8 10:57:33 2022 + Follow up to #479. Fix logic. Thanks to kkolinko review --- java/org/apache/catalina/connector/Response.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/org/apache/catalina/connector/Response.java b/java/org/apache/catalina/connector/Response.java index 1295922..032225b 100644 --- a/java/org/apache/catalina/connector/Response.java +++ b/java/org/apache/catalina/connector/Response.java @@ -1367,7 +1367,7 @@ public class Response implements HttpServletResponse { // If no ROOT context is defined, the context can be null. // In this case, the default Tomcat values are assumed, but without // reference to org.apache.catalina.STRICT_SERVLET_COMPLIANCE. -boolean reqHasContext = context == null; +boolean reqHasContext = (context != null); String locationUri; // Relative redirects require HTTP/1.1 if (getRequest().getCoyoteRequest().getSupportsRelativeRedirects() && - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch main updated: Follow up to #479. Fix logic. Thanks to kkolinko review
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/main by this push: new 7560ad8 Follow up to #479. Fix logic. Thanks to kkolinko review 7560ad8 is described below commit 7560ad854e6aaa2a12f97b184035fc96ea16626a Author: Mark Thomas AuthorDate: Tue Mar 8 10:57:33 2022 + Follow up to #479. Fix logic. Thanks to kkolinko review --- java/org/apache/catalina/connector/Response.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/org/apache/catalina/connector/Response.java b/java/org/apache/catalina/connector/Response.java index f3402e8..8eff0ad 100644 --- a/java/org/apache/catalina/connector/Response.java +++ b/java/org/apache/catalina/connector/Response.java @@ -1291,7 +1291,7 @@ public class Response implements HttpServletResponse { // If no ROOT context is defined, the context can be null. // In this case, the default Tomcat values are assumed, but without // reference to org.apache.catalina.STRICT_SERVLET_COMPLIANCE. -boolean reqHasContext = context == null; +boolean reqHasContext = (context != null); String locationUri; // Relative redirects require HTTP/1.1 if (getRequest().getCoyoteRequest().getSupportsRelativeRedirects() && - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch 10.0.x updated: Follow up to #479. Fix logic. Thanks to kkolinko review
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 10.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/10.0.x by this push: new c31e63b Follow up to #479. Fix logic. Thanks to kkolinko review c31e63b is described below commit c31e63bb3863bf59b66374a53f937a5fb014a5eb Author: Mark Thomas AuthorDate: Tue Mar 8 10:57:33 2022 + Follow up to #479. Fix logic. Thanks to kkolinko review --- java/org/apache/catalina/connector/Response.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/org/apache/catalina/connector/Response.java b/java/org/apache/catalina/connector/Response.java index f26550f..d0bdc30 100644 --- a/java/org/apache/catalina/connector/Response.java +++ b/java/org/apache/catalina/connector/Response.java @@ -1328,7 +1328,7 @@ public class Response implements HttpServletResponse { // If no ROOT context is defined, the context can be null. // In this case, the default Tomcat values are assumed, but without // reference to org.apache.catalina.STRICT_SERVLET_COMPLIANCE. -boolean reqHasContext = context == null; +boolean reqHasContext = (context != null); String locationUri; // Relative redirects require HTTP/1.1 if (getRequest().getCoyoteRequest().getSupportsRelativeRedirects() && - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [tomcat] branch 9.0.x updated: Fix Response#sendRedirect() if no request context exists.
On 08/03/2022 04:32, Konstantin Kolinko wrote: вт, 1 мар. 2022 г. в 18:08, : 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 e7d4ec3 Fix Response#sendRedirect() if no request context exists. e7d4ec3 is described below commit e7d4ec3cd0802da3898273d55f3d0496743153a5 Author: Knut Sander AuthorDate: Thu Feb 24 18:40:16 2022 +0100 Fix Response#sendRedirect() if no request context exists. If no ROOT context is defined, the context may be null in special cases, e.g. RewriteValve may use Response#sendRedirect() without any application context associated. In this case, the Tomcat behaviors for the context attributes useRelativeRedirects and sendRedirectBody are assumed, but without considering org.apache.catalina.STRICT_SERVLET_COMPLIANCE. --- java/org/apache/catalina/connector/Response.java | 9 +++-- webapps/docs/changelog.xml | 5 + 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/java/org/apache/catalina/connector/Response.java b/java/org/apache/catalina/connector/Response.java index 0950bcb..1295922 100644 --- a/java/org/apache/catalina/connector/Response.java +++ b/java/org/apache/catalina/connector/Response.java @@ -1363,17 +1363,22 @@ public class Response implements HttpServletResponse { // Generate a temporary redirect to the specified location try { +Context context = getContext(); +// If no ROOT context is defined, the context can be null. +// In this case, the default Tomcat values are assumed, but without +// reference to org.apache.catalina.STRICT_SERVLET_COMPLIANCE. +boolean reqHasContext = context == null; I think it was meant to be (context != null) above... Agreed. Good catch. Thanks. No sure how I missed that. Fixed. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org