Skip to content

Commit

Permalink
Content length is managed internally as a long. Fix a few places that…
Browse files Browse the repository at this point in the history
… were unnecessarily restricting it to an int.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1517970 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
markt-asf committed Aug 27, 2013
1 parent 058f044 commit 7c04000
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion java/org/apache/coyote/Request.java
Expand Up @@ -296,7 +296,7 @@ public void setCharacterEncoding(String enc) {
}


public void setContentLength(int len) {
public void setContentLength(long len) {
this.contentLength = len;
}

Expand Down
4 changes: 1 addition & 3 deletions java/org/apache/coyote/ajp/AbstractAjpProcessor.java
Expand Up @@ -688,9 +688,7 @@ protected void prepareRequest() {
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
Expand Down

0 comments on commit 7c04000

Please sign in to comment.