Status: Closed (View Workflow)
When downloading build artifacts from Hudson, files with a size exceeding 2 GB are served with a negative file size in the HTTP header.
This blocks picky HTTP clients from downloading artifacts from Hudson. More forgiving HTTP clients will download the file, but cannnot show any meaningful progress information, because they do not know the total file size in advance.
The class hudson.model.DirectoryBrowserSupport.ContentInfo stores the content length in an int field. The real file size is casted from a long value to int - which limits the file size to some 2 GB (2^31-1 bytes to be exact).
1.) Change field hudson.model.DirectoryBrowserSupport.ContentInfo.contentLength from int to long.
2.) Change method signature of StaplerResponse.serveFile(...) to use long instead of int as length parameter. Note: This requires a change in the Stapler project.