Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-2257

File uploads > 2GB are not available as request parameters

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Engine 2.2.0
    • Engine 2.2.6
    • Engine
    • None

    Description

      When doing a file upload with a file size exceeding 2GB:

      curl -F "my_file=@a_very_large_file" --header "Content-Type: multipart/related; type=application/atom+xml" http://...

      the following server code snippet:

      <%
      org.apache.sling.api.request.RequestParameter fileParam = slingRequest.getRequestParameter("my_file");
      %>

      will report a "null" fileParam. Reason for this is a limitation in commons-fileupload-1.1.1 which is embedded in sling-engine: the servlet container will report a content length of -1 (as the size is not representable in an integer) and FileUploadBase.parseRequest then throws an "UnknownSizeException". This was fixed in commons-fileupload-1.2.1.

      Attachments

        Issue Links

          Activity

            People

              enorman Eric Norman
              dpfister Dominique Pfister
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: