You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Andrew Grieve (JIRA)" <ji...@apache.org> on 2015/04/15 17:06:59 UTC

[jira] [Resolved] (CB-2423) FileTransfer does not set Content-Length header even if known -- unable to upload to Amazon

     [ https://issues.apache.org/jira/browse/CB-2423?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Grieve resolved CB-2423.
-------------------------------
    Resolution: Fixed

This was fixed I think.

> FileTransfer does not set Content-Length header even if known -- unable to upload to Amazon
> -------------------------------------------------------------------------------------------
>
>                 Key: CB-2423
>                 URL: https://issues.apache.org/jira/browse/CB-2423
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android, Plugin File Transfer
>    Affects Versions: 2.4.0
>         Environment: Android client
>            Reporter: Thomas O'Dell
>            Assignee: Andrew Grieve
>            Priority: Minor
>              Labels: features
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> FileTransfer does not set the Content-Length header even when known, which causes Amazon S3 to return HTML Code 411 (Length Required).
> Adding the following lines after line 328 solves the problem:
>     if (fixedLength >= 0) {
>        conn.setRequestProperty("Content-Length", ""+fixedLength);
>     }
> (Haven't tested on iOS, but see that iOS does have code to set Content-Length.)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org