You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Javier Godoy (Created) (JIRA)" <ji...@apache.org> on 2011/12/12 09:10:31 UTC

[jira] [Created] (JCR-3175) InputContextImpl: cannot upload file larger than 2GB

InputContextImpl: cannot upload file larger than 2GB
----------------------------------------------------

                 Key: JCR-3175
                 URL: https://issues.apache.org/jira/browse/JCR-3175
             Project: Jackrabbit Content Repository
          Issue Type: Bug
          Components: jackrabbit-webdav
    Affects Versions: 2.3.6
         Environment: Not applicable
            Reporter: Javier Godoy
            Priority: Minor


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)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (JCR-3175) InputContextImpl: cannot upload file larger than 2GB

Posted by "Julian Reschke (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-3175?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Julian Reschke resolved JCR-3175.
---------------------------------

    Resolution: Fixed
    
> InputContextImpl: cannot upload file larger than 2GB
> ----------------------------------------------------
>
>                 Key: JCR-3175
>                 URL: https://issues.apache.org/jira/browse/JCR-3175
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-webdav
>    Affects Versions: 2.4
>         Environment: Not applicable
>            Reporter: Javier Godoy
>            Assignee: Julian Reschke
>            Priority: Minor
>             Fix For: 2.4
>
>         Attachments: patch
>
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> 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)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (JCR-3175) InputContextImpl: cannot upload file larger than 2GB

Posted by "Javier Godoy (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-3175?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Javier Godoy updated JCR-3175:
------------------------------

    Status: Patch Available  (was: Open)
    
> InputContextImpl: cannot upload file larger than 2GB
> ----------------------------------------------------
>
>                 Key: JCR-3175
>                 URL: https://issues.apache.org/jira/browse/JCR-3175
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-webdav
>    Affects Versions: 2.3.6
>         Environment: Not applicable
>            Reporter: Javier Godoy
>            Priority: Minor
>             Fix For: 2.3.6
>
>         Attachments: patch
>
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> 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)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (JCR-3175) InputContextImpl: cannot upload file larger than 2GB

Posted by "Jukka Zitting (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-3175?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jukka Zitting updated JCR-3175:
-------------------------------

    Affects Version/s:     (was: 2.4)
                       2.2.10
                       2.3.5
        Fix Version/s: 2.2.11

Merged to the 2.2 branch in revision 1235791.
                
> InputContextImpl: cannot upload file larger than 2GB
> ----------------------------------------------------
>
>                 Key: JCR-3175
>                 URL: https://issues.apache.org/jira/browse/JCR-3175
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-webdav
>    Affects Versions: 2.2.10, 2.3.5
>         Environment: Not applicable
>            Reporter: Javier Godoy
>            Assignee: Julian Reschke
>            Priority: Minor
>             Fix For: 2.2.11, 2.3.6
>
>         Attachments: patch
>
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> 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)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (JCR-3175) InputContextImpl: cannot upload file larger than 2GB

Posted by "Jukka Zitting (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-3175?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jukka Zitting updated JCR-3175:
-------------------------------

    Fix Version/s:     (was: 2.4)
                   2.3.6
    
> InputContextImpl: cannot upload file larger than 2GB
> ----------------------------------------------------
>
>                 Key: JCR-3175
>                 URL: https://issues.apache.org/jira/browse/JCR-3175
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-webdav
>    Affects Versions: 2.4
>         Environment: Not applicable
>            Reporter: Javier Godoy
>            Assignee: Julian Reschke
>            Priority: Minor
>             Fix For: 2.3.6
>
>         Attachments: patch
>
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> 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)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (JCR-3175) InputContextImpl: cannot upload file larger than 2GB

Posted by "Javier Godoy (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-3175?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Javier Godoy updated JCR-3175:
------------------------------

    Attachment: patch
    
> InputContextImpl: cannot upload file larger than 2GB
> ----------------------------------------------------
>
>                 Key: JCR-3175
>                 URL: https://issues.apache.org/jira/browse/JCR-3175
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-webdav
>    Affects Versions: 2.3.6
>         Environment: Not applicable
>            Reporter: Javier Godoy
>            Priority: Minor
>             Fix For: 2.3.6
>
>         Attachments: patch
>
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> 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)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (JCR-3175) InputContextImpl: cannot upload file larger than 2GB

Posted by "Javier Godoy (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-3175?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Javier Godoy updated JCR-3175:
------------------------------

    Status: Open  (was: Patch Available)
    
> InputContextImpl: cannot upload file larger than 2GB
> ----------------------------------------------------
>
>                 Key: JCR-3175
>                 URL: https://issues.apache.org/jira/browse/JCR-3175
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-webdav
>    Affects Versions: 2.3.6
>         Environment: Not applicable
>            Reporter: Javier Godoy
>            Priority: Minor
>             Fix For: 2.3.6
>
>         Attachments: patch
>
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> 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)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (JCR-3175) InputContextImpl: cannot upload file larger than 2GB

Posted by "Julian Reschke (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-3175?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Julian Reschke updated JCR-3175:
--------------------------------

        Fix Version/s:     (was: 2.3.6)
                       2.4
    Affects Version/s:     (was: 2.3.6)
                       2.4
               Status: In Progress  (was: Patch Available)

Patch applied with additional exception handling; thanks Javier,
                
> InputContextImpl: cannot upload file larger than 2GB
> ----------------------------------------------------
>
>                 Key: JCR-3175
>                 URL: https://issues.apache.org/jira/browse/JCR-3175
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-webdav
>    Affects Versions: 2.4
>         Environment: Not applicable
>            Reporter: Javier Godoy
>            Assignee: Julian Reschke
>            Priority: Minor
>             Fix For: 2.4
>
>         Attachments: patch
>
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> 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)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (JCR-3175) InputContextImpl: cannot upload file larger than 2GB

Posted by "Javier Godoy (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-3175?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Javier Godoy updated JCR-3175:
------------------------------

    Comment: was deleted

(was: 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() {
)
    
> InputContextImpl: cannot upload file larger than 2GB
> ----------------------------------------------------
>
>                 Key: JCR-3175
>                 URL: https://issues.apache.org/jira/browse/JCR-3175
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-webdav
>    Affects Versions: 2.3.6
>         Environment: Not applicable
>            Reporter: Javier Godoy
>            Priority: Minor
>             Fix For: 2.3.6
>
>         Attachments: patch
>
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> 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)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (JCR-3175) InputContextImpl: cannot upload file larger than 2GB

Posted by "Javier Godoy (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-3175?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Javier Godoy updated JCR-3175:
------------------------------

    Status: Patch Available  (was: Open)

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() {

                
> InputContextImpl: cannot upload file larger than 2GB
> ----------------------------------------------------
>
>                 Key: JCR-3175
>                 URL: https://issues.apache.org/jira/browse/JCR-3175
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-webdav
>    Affects Versions: 2.3.6
>         Environment: Not applicable
>            Reporter: Javier Godoy
>            Priority: Minor
>             Fix For: 2.3.6
>
>         Attachments: patch
>
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> 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)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (JCR-3175) InputContextImpl: cannot upload file larger than 2GB

Posted by "Julian Reschke (Assigned) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-3175?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Julian Reschke reassigned JCR-3175:
-----------------------------------

    Assignee: Julian Reschke
    
> InputContextImpl: cannot upload file larger than 2GB
> ----------------------------------------------------
>
>                 Key: JCR-3175
>                 URL: https://issues.apache.org/jira/browse/JCR-3175
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-webdav
>    Affects Versions: 2.3.6
>         Environment: Not applicable
>            Reporter: Javier Godoy
>            Assignee: Julian Reschke
>            Priority: Minor
>             Fix For: 2.3.6
>
>         Attachments: patch
>
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> 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)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (JCR-3175) InputContextImpl: cannot upload file larger than 2GB

Posted by "Javier Godoy (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-3175?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Javier Godoy updated JCR-3175:
------------------------------

    Status: Open  (was: Patch Available)
    
> InputContextImpl: cannot upload file larger than 2GB
> ----------------------------------------------------
>
>                 Key: JCR-3175
>                 URL: https://issues.apache.org/jira/browse/JCR-3175
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-webdav
>    Affects Versions: 2.3.6
>         Environment: Not applicable
>            Reporter: Javier Godoy
>            Priority: Minor
>             Fix For: 2.3.6
>
>         Attachments: patch
>
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> 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)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (JCR-3175) InputContextImpl: cannot upload file larger than 2GB

Posted by "Javier Godoy (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-3175?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Javier Godoy updated JCR-3175:
------------------------------

    Fix Version/s: 2.3.6
           Status: Patch Available  (was: Open)
    
> InputContextImpl: cannot upload file larger than 2GB
> ----------------------------------------------------
>
>                 Key: JCR-3175
>                 URL: https://issues.apache.org/jira/browse/JCR-3175
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-webdav
>    Affects Versions: 2.3.6
>         Environment: Not applicable
>            Reporter: Javier Godoy
>            Priority: Minor
>             Fix For: 2.3.6
>
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> 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)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira