Type: Regression Bug
Affects Version/s: 6.2.10 EE GA1, 6.2.X EE, 7.0.0 M7
Steps to reproduce
1) Upload several big files (e.g: video files) into Document Library (overall size must be 3-4GB)
2) Go to Control Panel > Manage Liferay > Content > Documents and Media
3) Select to Export Documents and Media
4) Wait while the export process finishes
Expected result: When the export finished and the downloadable .LAR file is seen in the table, it should be able to download with the same size as it has in the parenthesis.
Actual result: Only 2GB will be saved.
Please note, that the Content-Length header reports 2GB as well.
The issue is caused by
LPS-44255 and it can be fixed in ServletResponseUtil
The problem is that HttpServletResponse.setContentLength() requires an int as a length, but that's not big enough in this case. So instead of
We should still use:
Please note that for write() method we incorrectly pass contentLength as int as well!