Bug 57581 - request.getBytesRead() should be long
request.getBytesRead() should be long
Status: RESOLVED FIXED
Product: Tomcat 7
Classification: Unclassified
Component: Servlet & JSP API
unspecified
PC All
: P2 normal (vote)
: ---
Assigned To: Tomcat Developers Mailing List
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2015-02-13 04:38 UTC by Jeonghoon Lee
Modified: 2015-02-19 04:20 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeonghoon Lee 2015-02-13 04:38:39 UTC
Class org.apache.coyote.Request has bytesRead variable's return type is int.

When file upload (grater than 2 GB), it returns negative value.

Return type should be change to long.

This bug affected all version of tomcat 6, 7, 8, 9.

---------------------------------------------------------

* AS-IS

private int bytesRead=0;

public int getBytesRead() {
   return bytesRead;
}

* TO-BE

private long bytesRead=0;

public long getBytesRead() {
   return bytesRead;
}
Comment 1 Konstantin Kolinko 2015-02-13 11:57:54 UTC
Fixed in Tomcat 7, 8, proposed for Tomcat 6.
The fix will be in 7.0.60, 8.0.19 onwards.

Thank you for reporting this issue.

r1659521 (trunk), r1659522 (8.0), r1659523 (7.0).
Comment 2 Konstantin Kolinko 2015-02-19 04:20:19 UTC
Fixed in Tomcat 6 by r1660792.
The fix will be in 6.0.44 onwards.