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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Environment:
      Hudson 1.355
    • Similar Issues:

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              mindless Alan Harder
              Reporter:
              swiest Simon Wiest
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: