Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-2423

FileTransfer does not set Content-Length header even if known -- unable to upload to Amazon

    XMLWordPrintableJSON

Details

    Description

      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.)

      Attachments

        Issue Links

          Activity

            People

              agrieve Andrew Grieve
              tomodell Thomas O'Dell
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 24h
                  24h
                  Remaining:
                  Remaining Estimate - 24h
                  24h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified