Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-6351

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


    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None
    • Hudson 1.355

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

      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.

            mindless Alan Harder
            swiest Simon Wiest
            0 Vote for this issue
            2 Start watching this issue