summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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";