You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Javier Puerto (JIRA)" <ji...@apache.org> on 2014/06/12 18:30:02 UTC

[jira] [Comment Edited] (CB-6928) Wrong behaviour transferring cacheable content

    [ https://issues.apache.org/jira/browse/CB-6928?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14029316#comment-14029316 ] 

Javier Puerto edited comment on CB-6928 at 6/12/14 4:28 PM:
------------------------------------------------------------

I see, thanks for the link. -It seems like the file-transfer tests are missing. How shall I proceed now?-
The tests for _file-transfer_ are in the _file_ directory. Seems like there's nothing to test the caching, I will have to write a test for the use case.


was (Author: jpuerto):
I see, thanks for the link. It seems like the file-transfer tests are missing. How shall I proceed now?

> Wrong behaviour transferring cacheable content
> ----------------------------------------------
>
>                 Key: CB-6928
>                 URL: https://issues.apache.org/jira/browse/CB-6928
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin File Transfer
>    Affects Versions: 3.5.0
>            Reporter: Javier Puerto
>            Priority: Minor
>
> Use case:
> Transfer resources from server to the device. To avoid unnecessary use of the device bandwidth, the resources that exists already are checked with the "If-Modified-Since" header so server can return 304 status code and update just in case that is needed.
> Result for Android test:
> The plugin doesn't care about the status code, if the request is success, open the InputStream and copy the content to the file. The problem is that a HTTP status of 304 has no response and that leads to a corrupted file transfer.
> Fix:
> If status code is 304, doesn't makes sense to process the InputStream. Read the status code after connection and if it's 304, skip the copy process and return the file entity like a success transfer.
> I've tested for Android only.



--
This message was sent by Atlassian JIRA
(v6.2#6252)