You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ti...@apache.org on 2020/10/27 15:42:50 UTC
[cordova-plugin-file-transfer] branch master updated: fix(ios):
remove hardcoded X-Requested-With header (#287)
This is an automated email from the ASF dual-hosted git repository.
timbru31 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-plugin-file-transfer.git
The following commit(s) were added to refs/heads/master by this push:
new 88e39df fix(ios): remove hardcoded X-Requested-With header (#287)
88e39df is described below
commit 88e39df8a547ba321ed02ec5dde4df68544bf09d
Author: Tim Brust <gi...@timbrust.de>
AuthorDate: Tue Oct 27 16:40:46 2020 +0100
fix(ios): remove hardcoded X-Requested-With header (#287)
no other platform sets this header and it should be up to the user if it's desired to 'disguise' the HTTP call as an XMLHttpRequest
---
src/ios/CDVFileTransfer.m | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/ios/CDVFileTransfer.m b/src/ios/CDVFileTransfer.m
index 5d556b0..66cb9a1 100644
--- a/src/ios/CDVFileTransfer.m
+++ b/src/ios/CDVFileTransfer.m
@@ -102,8 +102,6 @@ static CFIndex WriteDataToStream(NSData* data, CFWriteStreamRef stream)
- (void)applyRequestHeaders:(NSDictionary*)headers toRequest:(NSMutableURLRequest*)req
{
- [req setValue:@"XMLHttpRequest" forHTTPHeaderField:@"X-Requested-With"];
-
for (NSString* headerName in headers) {
id value = [headers objectForKey:headerName];
if (!value || (value == [NSNull null])) {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org