Artifacts with a file size exceeding 2GB are served with negative file size

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      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.

      Cause:
      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).

      Proposed Solution:
      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.

            Assignee:
            Alan Harder
            Reporter:
            Simon Wiest
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: