Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP alterations in SDLURLSession to use NSURLComponents #436

Merged
merged 5 commits into from Aug 18, 2016

Conversation

joeljfischer
Copy link
Contributor

Fixes #432

This PR is ready for review.

Risk

This PR makes no API changes.

Testing Plan

A unit test has been included

Summary

This PR fixes some possible bugs with HTTP -> HTTPS conversion in SDLURLSession

Changelog

Bug Fixes
  • If the URL contains more than one "http" in its URL, only the scheme will be modified instead of all of them.

@joeljfischer joeljfischer added the bug A defect in the library label Aug 18, 2016
@joeljfischer joeljfischer added this to the 4.2.X milestone Aug 18, 2016
@@ -64,7 +64,7 @@ - (instancetype)init {
- (void)dataFromURL:(NSURL *)url completionHandler:(SDLURLConnectionRequestCompletionHandler)completionHandler {
// Apple no longer allows HTTP URLs without a special exception as of Jan. 2017
if ([url.scheme isEqualToString:@"http"]) {
url = [NSURL URLWithString:[url.absoluteString stringByReplacingOccurrencesOfString:@"http://" withString:@"https://"]];
url = [NSURL URLWithString:[url.absoluteString stringByReplacingCharactersInRange:NSMakeRange(0, 4) withString:@"https"]];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unnecessary space here.

@asm09fsu
Copy link
Contributor

LGTM 👍

@joeljfischer joeljfischer merged commit 6283168 into master Aug 18, 2016
@joeljfischer joeljfischer deleted the hotfix/issue_432_HTTP__Convert_ATS branch August 18, 2016 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A defect in the library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HTTP limitation with ATS
2 participants