cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Shakhnazarov (Akvelon)" <>
Subject RE: CB-10974 FileTransfer chunkedMode=false + HTTPS
Date Wed, 23 Nov 2016 15:14:22 GMT
There is a related issue on Ios platform [3] - having chunkedMode=true causes progress not
to be computable as we don't include Content-Length header to the request in this case.
Reverting that logic fixes the onprogress event but breaks our tests - so this is a question
again - should we care about specification or about functionality?
Should we revert this to make the progress computable for chunkedMode=true?

Does anyone has knowledge to advise about the drawbacks of this specific decision would it
be taken (tests show that progress is being reported correctly but this is again is kind of
an internal implementation we will depend on)?


Please let me know if you have any questions or considerations.

Best regards,
Sergey Shakhnazarov.

-----Original Message-----
From: Sergey Shakhnazarov (Akvelon) [] 
Sent: Wednesday, November 23, 2016 14:47
Subject: CB-10974 FileTransfer chunkedMode=false + HTTPS

Hi guys,

There were several user reports recently about the upload failures caused by the lack of Content-Length
header in case of HTTPS uploads.
This issue is caused by the FileTransfer code, which forces chunkedMode=true for HTTPS uploads
due to possible OutOfMemoryException.
As a solution I've send a PR [1], which does not touch chunkedMode if it was specified as
false in the UploadOptions.

Do you think this a correct solution?

According to the HTTP specification [2]:

Ø  Messages MUST NOT include both a Content-Length header field and a non-identity transfer-coding.
If the message does include a non- identity transfer-coding, the Content-Length MUST be ignored.

So including a Content-Length for the chunkedMode=true case would be wrong.

Furthermore we don't control the underlying implementation so can't define the summary length
of chunks beforehand.



Please let me know if you have any questions or considerations.

Best regards,
Sergey Shakhnazarov.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message