[
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