diff options
author | Joel Fischer <joeljfischer@gmail.com> | 2016-08-22 16:23:59 -0400 |
---|---|---|
committer | Joel Fischer <joeljfischer@gmail.com> | 2016-08-22 16:23:59 -0400 |
commit | 68b99483fc918e0302328d1cc8ba180712ab5907 (patch) | |
tree | 17b431ab89f74964b7ddcf56afcf00ca41468f0a | |
parent | 13ce1878d5b13fcb4cfbb8504dadc28fce76d977 (diff) | |
download | sdl_ios-68b99483fc918e0302328d1cc8ba180712ab5907.tar.gz |
Fix HTTPS uploads
-rw-r--r-- | SmartDeviceLink/SDLURLSession.m | 2 | ||||
-rw-r--r-- | SmartDeviceLinkTests/UtilitiesSpecs/HTTP Connection/SDLURLSessionSpec.m | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/SmartDeviceLink/SDLURLSession.m b/SmartDeviceLink/SDLURLSession.m index b938ed666..569bad2db 100644 --- a/SmartDeviceLink/SDLURLSession.m +++ b/SmartDeviceLink/SDLURLSession.m @@ -76,7 +76,7 @@ static float DefaultConnectionTimeout = 45.0; } - (void)uploadWithURLRequest:(NSURLRequest *)request data:(NSData *)data completionHandler:(SDLURLConnectionRequestCompletionHandler)completionHandler { - NSURL *newURL = nil; + NSURL *newURL = request.URL; if ([request.URL.scheme isEqualToString:@"http"]) { newURL = [NSURL URLWithString:[request.URL.absoluteString stringByReplacingCharactersInRange:NSMakeRange(0, 4) withString:@"https"]]; } diff --git a/SmartDeviceLinkTests/UtilitiesSpecs/HTTP Connection/SDLURLSessionSpec.m b/SmartDeviceLinkTests/UtilitiesSpecs/HTTP Connection/SDLURLSessionSpec.m index 68caa4e98..ed613c8fb 100644 --- a/SmartDeviceLinkTests/UtilitiesSpecs/HTTP Connection/SDLURLSessionSpec.m +++ b/SmartDeviceLinkTests/UtilitiesSpecs/HTTP Connection/SDLURLSessionSpec.m @@ -10,7 +10,7 @@ describe(@"the url session", ^{ __block SDLURLSession *testSession = nil; describe(@"attempting to get good data", ^{ - context(@"from an http address", ^{ + context(@"from an https address", ^{ context(@"uploading data", ^{ NSData *testData = [@"testData" dataUsingEncoding:NSUTF8StringEncoding]; NSArray *someJSONObject = @[@"one", @"two"]; |