cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From daserge <...@git.apache.org>
Subject [GitHub] cordova-plugin-file-transfer pull request: Gzip support for wp8.x ...
Date Wed, 21 Oct 2015 17:39:42 GMT
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);
        }
    }
    ...
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


Mime
View raw message