summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Fischer <joeljfischer@gmail.com>2016-08-23 09:06:10 -0400
committerJoel Fischer <joeljfischer@gmail.com>2016-08-23 09:06:10 -0400
commit12b178383490113e425bc527f653d426cc345b40 (patch)
tree4b0d4b165ed2a93503ec1b02b6780d818b2aefd3
parent68b99483fc918e0302328d1cc8ba180712ab5907 (diff)
downloadsdl_ios-hotfix/issue_432_https_fails.tar.gz
Minor clarity updates to HTTPS alterationshotfix/issue_432_https_fails
-rw-r--r--SmartDeviceLink/SDLURLSession.m8
1 files changed, 4 insertions, 4 deletions
diff --git a/SmartDeviceLink/SDLURLSession.m b/SmartDeviceLink/SDLURLSession.m
index 569bad2db..2b8df45de 100644
--- a/SmartDeviceLink/SDLURLSession.m
+++ b/SmartDeviceLink/SDLURLSession.m
@@ -76,13 +76,13 @@ static float DefaultConnectionTimeout = 45.0;
}
- (void)uploadWithURLRequest:(NSURLRequest *)request data:(NSData *)data completionHandler:(SDLURLConnectionRequestCompletionHandler)completionHandler {
- NSURL *newURL = request.URL;
- if ([request.URL.scheme isEqualToString:@"http"]) {
- newURL = [NSURL URLWithString:[request.URL.absoluteString stringByReplacingCharactersInRange:NSMakeRange(0, 4) withString:@"https"]];
+ NSURL *url = request.URL;
+ if ([url.scheme isEqualToString:@"http"]) {
+ url = [NSURL URLWithString:[url.absoluteString stringByReplacingCharactersInRange:NSMakeRange(0, 4) withString:@"https"]];
}
NSMutableURLRequest *mutableRequest = [request mutableCopy];
- mutableRequest.URL = newURL;
+ mutableRequest.URL = url;
mutableRequest.HTTPBody = data;
mutableRequest.HTTPMethod = @"POST";