You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by kk...@apache.org on 2014/10/20 14:34:53 UTC
svn commit: r1633128 - in /tomcat/trunk:
java/org/apache/coyote/http11/filters/IdentityInputFilter.java
webapps/docs/changelog.xml
Author: kkolinko
Date: Mon Oct 20 12:34:52 2014
New Revision: 1633128
URL: http://svn.apache.org/r1633128
Log:
Do not increase remaining counter at end of stream in IdentityInputFilter.
I do not know of a scenario where this results in anything observable, but I think it is safer to fix the arithmetics here.
Modified:
tomcat/trunk/java/org/apache/coyote/http11/filters/IdentityInputFilter.java
tomcat/trunk/webapps/docs/changelog.xml
Modified: tomcat/trunk/java/org/apache/coyote/http11/filters/IdentityInputFilter.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/filters/IdentityInputFilter.java?rev=1633128&r1=1633127&r2=1633128&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/filters/IdentityInputFilter.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/filters/IdentityInputFilter.java Mon Oct 20 12:34:52 2014
@@ -118,7 +118,9 @@ public class IdentityInputFilter impleme
} else {
result = nRead;
}
- remaining = remaining - nRead;
+ if (nRead > 0) {
+ remaining = remaining - nRead;
+ }
} else {
// No more bytes left to be read : return -1 and clear the
// buffer
Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1633128&r1=1633127&r2=1633128&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Mon Oct 20 12:34:52 2014
@@ -177,6 +177,10 @@
<add>
Disable SSLv3 by default for the APR/native HTTPS connector. (markt)
</add>
+ <fix>
+ Do not increase remaining counter at end of stream in
+ IdentityInputFilter. (kkolinko)
+ </fix>
</changelog>
</subsection>
<subsection name="Jasper">
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org