You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by sviluppatoribk <gi...@git.apache.org> on 2015/05/21 16:24:39 UTC

[GitHub] cordova-plugin-file-transfer pull request: Gzip support for wp8.x ...

GitHub user sviluppatoribk opened a pull request:

    https://github.com/apache/cordova-plugin-file-transfer/pull/85

    Gzip support for wp8.x platform in download response

    Actually WP platform does not support gzip decompression if you send "Accept-Encoding:gzip" header on download request (Android and iOS platform altready support it). 
    
    With this fix we have a drastically improvement of download performance on WP8.x platform (only when server support compression of course).
    
    I have included Microsoft System.IO.Compression.dll (https://www.nuget.org/packages/Microsoft.Bcl.Compression/3.9.85)
    for compatibility with WP8.0 platform. 


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/sviluppatoribk/cordova-plugin-file-transfer master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-plugin-file-transfer/pull/85.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #85
    
----
commit 3aa82e0b7ceee9a88e9818ca17d86290aae3d28e
Author: sviluppatoribk <sv...@users.noreply.github.com>
Date:   2015-05-21T13:20:17Z

    Added gzip support for wp platform

commit bf27e20fddbb5ee8830e8da2afb4478e88cb75c9
Author: sviluppatoribk <sv...@users.noreply.github.com>
Date:   2015-05-21T13:21:05Z

    Added compression dll for wp gzip support

commit 70060e2163a5c7be8b5ce977a1ed1f23298cfa3c
Author: sviluppatoribk <sv...@gmail.com>
Date:   2015-05-21T13:53:40Z

    Added Compression dll

commit 0e518171c13686b4789a9519910906d6d19ac18a
Author: sviluppatoribk <sv...@users.noreply.github.com>
Date:   2015-05-21T14:10:49Z

    Update plugin.xml

----


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


[GitHub] cordova-plugin-file-transfer pull request: CB-9839 Add gzip suppor...

Posted by sviluppatoribk <gi...@git.apache.org>.
Github user sviluppatoribk commented on the pull request:

    https://github.com/apache/cordova-plugin-file-transfer/pull/85#issuecomment-196215249
  
    Done


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


[GitHub] cordova-plugin-file-transfer pull request: Gzip support for wp8.x ...

Posted by daserge <gi...@git.apache.org>.
Github user daserge commented on the pull request:

    https://github.com/apache/cordova-plugin-file-transfer/pull/85#issuecomment-151058822
  
    Ping, @sviluppatoribk


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


[GitHub] cordova-plugin-file-transfer pull request: Gzip support for wp8.x ...

Posted by sviluppatoribk <gi...@git.apache.org>.
Github user sviluppatoribk commented on the pull request:

    https://github.com/apache/cordova-plugin-file-transfer/pull/85#issuecomment-104544749
  
    Please can you tell me what error code you get instead of 401? Test 6 of file-transfer-plugin call "http://cordova-filetransfer.jitsu.com/download_basic_auth" url and on my run it return correct error code.. I have see there are many pull request failed for this test case, you are able to call that url from test machine? 


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


[GitHub] cordova-plugin-file-transfer pull request: Gzip support for wp8.x ...

Posted by daserge <gi...@git.apache.org>.
Github user daserge commented on a diff in the pull request:

    https://github.com/apache/cordova-plugin-file-transfer/pull/85#discussion_r42656825
  
    --- Diff: src/wp/FileTransfer.cs ---
    @@ -697,31 +698,39 @@ private void downloadCallback(IAsyncResult asynchronousResult)
                         {
                             long totalBytes = response.ContentLength;
                             int bytesRead = 0;
    -                        using (BinaryReader reader = new BinaryReader(response.GetResponseStream()))
    +
    +
    +                        // Ambrogelli 4 gzip!
    --- End diff --
    
    Please translate to English.


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


[GitHub] cordova-plugin-file-transfer pull request: Gzip support for wp8.x ...

Posted by daserge <gi...@git.apache.org>.
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