You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2015/10/21 19:40:27 UTC
[jira] [Commented] (CB-9839) Add gzip support to
file-transfer.download on wp8
[ https://issues.apache.org/jira/browse/CB-9839?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14967522#comment-14967522 ]
ASF GitHub Bot commented on CB-9839:
------------------------------------
Github user daserge commented on the pull request:
https://github.com/apache/cordova-plugin-file-transfer/pull/85#issuecomment-149973070
@sviluppatoribk, thanks for your contribution!
I have filed a Jira issue for this:
https://issues.apache.org/jira/browse/CB-9839
In order this to be merged could you please rebase, squash and rename commit and PR to `"CB-9839 Add gzip support to file-transfer.download on wp8"`?
Also please sign the ICLA: http://www.apache.org/dev/new-committers-guide.html#cla
gzip-case also needs an update in terms of progress event as length becomes non computable; the code change can be the following:
```csharp
bool useGzip = encodingHeader.Contains("gzip");
using (Stream responseStreamGz = useGzip ? new GZipStream(response.GetResponseStream(), CompressionMode.Decompress) : response.GetResponseStream())
...
if (buffer.Length > 0 && !reqState.isCancelled)
{
writer.Write(buffer);
if (useGzip)
{
DispatchFileTransferProgress(0, 0, callbackId);
}
else
{
DispatchFileTransferProgress(bytesRead, totalBytes, callbackId);
}
}
...
```
> Add gzip support to file-transfer.download on wp8
> -------------------------------------------------
>
> Key: CB-9839
> URL: https://issues.apache.org/jira/browse/CB-9839
> Project: Apache Cordova
> Issue Type: New Feature
> Components: Plugin File Transfer
> Reporter: Sergey Shakhnazarov
> Assignee: Sergey Shakhnazarov
> Labels: gzip, wp8
>
--
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