Jackrabbit Content Repository
  1. Jackrabbit Content Repository
  2. JCR-3175

InputContextImpl: cannot upload file larger than 2GB

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2.10, 2.3.5
    • Fix Version/s: 2.2.11, 2.3.6
    • Component/s: jackrabbit-webdav
    • Labels:
      None
    • Environment:
      Not applicable

      Description

      If an entity is larger than 2GB, the Content-Length cannot be obtained by using getIntHeader because of integer overflow. One needs to parse the value of the header from string to long. This issue affects InputContextImpl.getContentLength() in org.apache.jackrabbit.webdav.io from webdav/java (the current behavior is that the header is converted from string to int by the servlet API, then from int to long by Jackrabbit)

      Testcase: largefile from Litmus. (test 3 - large_put fails when the PUT request is received)

      1. patch
        0.8 kB
        Javier Godoy

        Activity

        This list of reviews may be incomplete, as errors occurred retrieving data from the following repositories:

        • Request to https://fisheye6.atlassian.com/ failed: Error in remote call to 'FishEye 0 (https://fisheye6.atlassian.com/)' (https://fisheye6.atlassian.com) [AbstractRestCommand{path='rest-service/search-v1/reviews', params={maxReturn=50, term=JCR-3175}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)
        • Request to https://fisheye6.atlassian.com/ failed: Error in remote call to 'FishEye 0 (https://fisheye6.atlassian.com/)' (https://fisheye6.atlassian.com) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={expand=changesets[-100:-1], query=JCR-3175}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)

        This list may be incomplete, as errors occurred whilst retrieving source from linked applications:

        • Request to https://fisheye6.atlassian.com/ failed: Error in remote call to 'FishEye 0 (https://fisheye6.atlassian.com/)' (https://fisheye6.atlassian.com) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={expand=changesets[0:20].revisions[0:29],reviews, query=JCR-3175}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Patch Available Patch Available Open Open
        1m 33s 2 Javier Godoy 12/Dec/11 08:12
        Open Open Patch Available Patch Available
        10m 52s 3 Javier Godoy 12/Dec/11 08:21
        Patch Available Patch Available In Progress In Progress
        7h 5m 1 Julian Reschke 12/Dec/11 15:26
        In Progress In Progress Resolved Resolved
        11s 1 Julian Reschke 12/Dec/11 15:27
        Resolved Resolved Closed Closed
        37d 22h 20m 1 Jukka Zitting 19/Jan/12 13:47
        Jukka Zitting made changes -
        Fix Version/s 2.2.11 [ 12319082 ]
        Affects Version/s 2.3.5 [ 12319164 ]
        Affects Version/s 2.2.10 [ 12318249 ]
        Affects Version/s 2.4 [ 12318241 ]
        Hide
        Jukka Zitting added a comment -

        Merged to the 2.2 branch in revision 1235791.

        Show
        Jukka Zitting added a comment - Merged to the 2.2 branch in revision 1235791.
        Jukka Zitting made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Jukka Zitting made changes -
        Fix Version/s 2.3.6 [ 12319192 ]
        Fix Version/s 2.4 [ 12318241 ]
        Julian Reschke made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Julian Reschke made changes -
        Status Patch Available [ 10002 ] In Progress [ 3 ]
        Affects Version/s 2.4 [ 12318241 ]
        Affects Version/s 2.3.6 [ 12319192 ]
        Fix Version/s 2.4 [ 12318241 ]
        Fix Version/s 2.3.6 [ 12319192 ]
        Hide
        Julian Reschke added a comment -

        Patch applied with additional exception handling; thanks Javier,

        Show
        Julian Reschke added a comment - Patch applied with additional exception handling; thanks Javier,
        Julian Reschke made changes -
        Assignee Julian Reschke [ reschke ]
        Javier Godoy made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Javier Godoy made changes -
        Comment [ Index: J:/lib/jackrabbit-trunk/webdav/java/org/apache/jackrabbit/webdav/io/InputContextImpl.java
        ===================================================================
        --- J:/lib/jackrabbit-trunk/webdav/java/org/apache/jackrabbit/webdav/io/InputContextImpl.java (revision 1180566)
        +++ J:/lib/jackrabbit-trunk/webdav/java/org/apache/jackrabbit/webdav/io/InputContextImpl.java (working copy)
        @@ -71,8 +71,8 @@
             }
         
             public long getContentLength() {
        - int length = request.getIntHeader(DavConstants.HEADER_CONTENT_LENGTH);
        - return Long.parseLong(length + "");
        + String length = request.getHeader(DavConstants.HEADER_CONTENT_LENGTH);
        + return length==null?-1:Long.parseLong(length);
             }
         
             public String getContentType() {
        ]
        Javier Godoy made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Javier Godoy made changes -
        Attachment patch [ 12506977 ]
        Javier Godoy made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Javier Godoy made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Javier Godoy made changes -
        Field Original Value New Value
        Status Open [ 1 ] Patch Available [ 10002 ]
        Fix Version/s 2.3.6 [ 12319192 ]
        Javier Godoy created issue -

          People

          • Assignee:
            Julian Reschke
            Reporter:
            Javier Godoy
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 10m
              10m
              Remaining:
              Remaining Estimate - 10m
              10m
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development