Commit Graph

41 Commits

Author SHA1 Message Date
エリス 2cdb0403a8 feat!: remove deprecated whitelist usage (#307) 2021-07-28 01:12:56 +09:00
Simon MacDonald 82100791e3 CB-12809: Google Play Blocker: Unsafe SSL TrustManager Defined
Closes #187
2017-08-31 17:33:27 -04:00
daserge 655489905a CB-10974 Cordova file transfer Content-Length header problem
Don't force chunkedMode=true for HTTPS if it was specified as false in the UploadOptions (added a warning about possible OOM for chunkedMode=false+HTTPS case)
2016-11-23 14:33:32 +03:00
Adam Nemitoff 2b6b6d9333 CB-9022 Fix exception thrown by call to remapApi on main thread
When reamapApi was being called for device file it was performing IO on
the WebCore thread and throwing an IllegalState exception.  This seems
to have only been a problem when local URL corresponded to a video file.

Moved calls to remapApi for device URLs within new thread context so
that IO is performed on background thread.

This is the same fix as 3ccf9f8 but for `download` operation

This closes #124
2016-08-23 11:07:50 +03:00
Simon MacDonald 13d5cfe4dc Plugin uses Android Log class and not Cordova LOG class 2016-08-22 16:27:02 -04:00
Vladimir Kotikov 3ccf9f8462 CB-9022 Resolve source URI on background thread
We should call remapUri on background thread otherwise it
throws IllegalStateException when trying to remap  'cdvfile://localhost/content/...' URIs via ContentFilesystem
2016-08-18 16:34:18 +03:00
daserge 9347606dd3 CB-10974 Cordova file transfer Content-Length header problem
Fixed iOS logic to not to include Content-Length when chunkedMode=true
Fixed Android logic preventing chunkedMode to be enabled for http uploads
Added tests for chunkedMode
Documented chunkedMode not supported on Windows
Documented Uploading of an empty file is not supported for chunkedMode=true and multipart=false for iOS, pended the corresponding test
2016-05-17 12:24:27 +03:00
daserge 007f98692b CB-9563 Mulptipart form data is used even a header named Content-Type is present
Adds non-multipart implementation for Windows and a corresponding test
Adds a fix for Android for uploadResult.bytesSent = 0 for small files
Fixes parameters of FILE_NOT_FOUND_ERR case in upload operation on Windows - passing source file name instead of duplicated server/destination argument

github: close #117
2015-11-25 19:57:48 +03:00
Jeroen Verhoest cdeec1c59f CB-9879 getCookies can cause unhandled NullPointerException
Added extra check for CookieManager instance (null pointer on Crosswalk/Android < 4.4)

github: close #107
2015-11-16 19:01:11 +03:00
Vito Rifino ea271933e9 CB-8431 File Transfer tests crash on Android Lolipop
github: close #79
2015-10-17 11:40:44 +03:00
Joe Bowser a4a448095c CB-9624: There's a difference between what's being passed in and what should actually be sent to the File Transfer plugin 2015-09-08 14:04:04 -07:00
Joe Bowser 8fcdb1aa3d Found issue where : is accepted as a valid header, this is obviously wrong 2015-09-08 11:19:34 -07:00
Snay 2b31723708 CB-9562 Fixed incorrect headers handling on Android 2015-08-26 16:35:09 -07:00
Joe Bowser ad6647120d Fixing headers so they don't accept non-ASCII 2015-08-24 11:15:37 -07:00
Ian Clelland 7591ab84b5 CB-6503: Null pointer check for headers in upload (This closes #27) 2015-06-08 15:09:24 -04:00
Michael Chen 04f088b6c9 CB-6503: Allow payload content-types other than multipart/form-data to be used for upload 2015-06-08 15:09:24 -04:00
Darryl Pogue f5d6cd8e16 Fix NoSuchMethodException looking up cookies. 2015-03-05 11:48:47 -08:00
Kelly Campbell 0aae94495f android: Fix error reporting for unknown uri type on sourceUri instead of targetUri 2015-01-31 22:34:33 -05:00
Darryl Pogue c12f1eb9be CB-5059 Add a CookieManager abstraction for pluggable webviews (close #60)
This allows FileTransfer to correctly use webview cookies regardless of
which webview engine is in use.
2015-01-30 10:19:34 -05:00
Ian Clelland 674c3ae180 CB-7912: Update to work with whitelist plugins in Cordova 4.x 2014-11-14 11:23:07 -05:00
Javier Puerto b88584c5a3 CB-6928: Handle 304 status code 2014-07-08 14:14:12 -04:00
Javier Puerto 22f1ea573c CB-6928: Open output stream only if it's necessary. 2014-07-08 14:14:12 -04:00
Ian Clelland 32106e7a3f CB-6781: Continue previous commit with one new instance (This closes #30) 2014-06-11 16:35:13 -04:00
ignisvulpis 46f9c1d458 CB-6781: add the exception text to the error object 2014-06-11 16:33:39 -04:00
Ian Clelland 690824248c CB-6890: Fix pluginManager access for 4.0.x branch 2014-06-06 14:27:57 -04:00
Andrew Grieve 67ae8d8852 CB-6378 Use connection.disconnect() instead of stream.close() for thread-safety 2014-05-06 10:25:01 -04:00
Andrew Grieve 98e5da556f CB-6494 android: Fix upload of KitKat content URIs
FileTransfer was double-decoding the source URL.
2014-04-22 22:16:53 -04:00
Ian Clelland 35f80e42ec CB-6050: Use instance method on actual file plugin object to get FileEntry to return on download 2014-02-18 15:25:01 -05:00
Christoph Neumann 651460fb6b CB-6000 Nginx rejects Content-Type without a space before "boundary".
From: https://github.com/apache/cordova-plugin-file-transfer/pull/6
2014-02-10 13:30:27 -05:00
Bas Bosman 6f91ac3a30 CB-4907 Close stream when we're finished with it 2014-02-10 13:26:43 -05:00
Colin Mahoney 8374b3dd67 CB-5631 Removed SimpleTrackingInputStream.read(byte[] buffer)
InputStream.read(byte[] buffer) calls InputStream.read(byte[] bytes, int
offset, int count).  As SimpleTrackingInputStream overrides both these
methods a call to SimpleTrackingInputStream.read(byte[] buffer) results
in a call to SimpleTrackingInputStream.read(byte[] bytes, int offset,
int count) - and two calls to SimpleTrackingInputStream.updateBytesRead,
so the counter bytesRead gets incremented twice for each read.
2014-01-10 12:16:26 -05:00
Andrew Grieve 3c1ff16064 CB-5762 android: Fix lengthComputable set wrong for gzip downloads
Gzip + no Content-Length header should be lengthComputable=false
2014-01-10 11:45:59 -05:00
Andrew Grieve 9a125991f7 [CB-4417] Move cordova-plugin-file-transfer to its own Java package. 2013-08-14 15:33:18 -07:00
Andrew Grieve a83011685d Fix NPE in mobile-spec Upload of an unknown host test.
Was happening over cell connection.
2013-08-14 15:33:18 -07:00
Andrew Grieve d29f2b044b [android] [CB-3384] Make FileTransfer use CordovaResourceApi. 2013-07-16 11:05:34 -04:00
Max Woghiren fd6ef121ae [CB-1605] Warning cleanup! Closed an input stream.
Also removed imports.
2013-07-11 17:44:58 -04:00
Andrew Grieve f1c7749382 Use UriResolvers in FileTransfer. Fixes mobile-spec test where source is a file:// URL. 2013-07-10 15:14:00 -04:00
Ian Clelland e4559a21d7 [CB-3430] [CB-1413] Remove Old (2.3.3) HTTP Workaround
Cherry-picked from 2.x branch of cordova-android [01946dd4]
2013-07-10 12:01:04 -04:00
Andrew Grieve cdb45cd931 [CB-4038] - Remove o.a.c.api namespace 2013-07-10 09:31:32 -04:00
Joe Bowser feb16bf341 Updating FileTransfer based on changes in master, read pre-3.0 commit history for author info 2013-05-13 11:42:24 -07:00
Joe Bowser 35e89b3aec Initial Commit 2013-04-02 15:42:06 -07:00