Closed restouffer closed 6 years ago
I've been 2 days debugging my project when i figured out that this was actually a problem. When i tried to download images from http with 301 response, file transfer downloaded that response and not followed the new url to get the final resource via https. Exactly what restouffer says. I think the plugin should allow to download the real resource. I am thinking this could be a security issue as well??. The url suggested in the 301 response will go trought the whitelist plugin?
I have also hit this problem and it causes ongoing issues for my app. Could this be checked and merged soon?
I encountered the same problem. restouffer's branch fixes the issue. It's vital that this gets merged soon since usually we don't have power over the backend to remove the redirect.
I'm not familiar with Jenkins, but I'm not convinced those links suggest this patch is the cause of the CI failures. This patch is Build #10 out of 11. Build 9 has 75 failures while 10 has 59, which could mean this patch fixes 16 errors from the earlier builds. If there is a problem with the patch I would be more than happy to try fixing it, but I'll need more details.
Build Errors
#1 0
#2 0
#3 0
#4 72
#5 75
#6 77
#7 77
#8 77
#9 75
#10 59
#11 77
Please merge...
With the new features introduced in XMLHttpRequest, this plugin is not needed any more. Migrating from this plugin to using the new features of XMLHttpRequest, is explained in this Cordova blog post.
The FileTransfer plugin was stopping on a 301 redirect and storing the HTML from that page instead of the target file. This adds a loop that detects redirect headers and continues following them until a non-redirect page is loaded.
Based on the work of mathieudutour: https://github.com/phonegap/phonegap-plugin-contentsync/pull/95