Author: markt
Date: Wed Aug 28 13:17:12 2013
New Revision: 1518197
URL: http://svn.apache.org/r1518197
Log:
Content length is managed internally as a long. Fix a few places that were
unnecessarily restricting it to an int.
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/ajp/AbstractAjpProcessor.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
Merged /tomcat/trunk:r1517898,1517970
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=1518197&r1=1518196&r2=1518197&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 Wed Aug 28
13:17:12 2013
@@ -272,7 +272,7 @@ public final class Request {
}
- public void setContentLength(int len) {
+ public void setContentLength(long len) {
this.contentLength = len;
}
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java?rev=1518197&r1=1518196&r2=1518197&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java
Wed Aug 28 13:17:12 2013
@@ -707,9 +707,7 @@ public abstract class AbstractAjpProcess
if (hId == Constants.SC_REQ_CONTENT_LENGTH ||
(hId == -1 && tmpMB.equalsIgnoreCase("Content-Length"))) {
// just read the content-length header, so set it
- long cl = vMB.getLong();
- if(cl < Integer.MAX_VALUE)
- request.setContentLength( (int)cl );
+ request.setContentLength(vMB.getLong());
} else if (hId == Constants.SC_REQ_CONTENT_TYPE ||
(hId == -1 && tmpMB.equalsIgnoreCase("Content-Type"))) {
// just read the content-type header, so set it
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=1518197&r1=1518196&r2=1518197&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Wed Aug 28 13:17:12 2013
@@ -176,6 +176,11 @@
APR/native and HTTP APR/native connectors no longer support multiple
poller threads. Both connectors now use a single poller thread.
(markt)
</update>
+ <fix>
+ Internally, content length is managed as a <code>long</code>. Fix a few
+ places in the AJP connector where this was restricted to an
+ <code>int</code>. (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Jasper">
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]