Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Consideration of the case that contains the port number in the URL #2

Merged
merged 1 commit into from

2 participants

@t-yamada

Change to be switched "normalizedURLString" when URL is contain the port number

@atebits atebits merged commit 3ce76d5 into atebits:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 8, 2012
This page is out of date. Refresh to see the latest.
Showing with 6 additions and 1 deletion.
  1. +6 −1 OAuthCore.m
View
7 OAuthCore.m
@@ -73,7 +73,12 @@ static NSInteger SortParameter(NSString *key1, NSString *key2, void *context) {
}
NSString *normalizedParameterString = [parameterArray componentsJoinedByString:@"&"];
- NSString *normalizedURLString = [NSString stringWithFormat:@"%@://%@%@", [url scheme], [url host], [url path]];
+ NSString *normalizedURLString;
+ if ([url port] == nil) {
+ normalizedURLString = [NSString stringWithFormat:@"%@://%@%@", [url scheme], [url host], [url path]];
+ } else {
+ normalizedURLString = [NSString stringWithFormat:@"%@://%@:%@%@", [url scheme], [url host], [url port], [url path]];
+ }
NSString *signatureBaseString = [NSString stringWithFormat:@"%@&%@&%@",
[method ab_RFC3986EncodedString],
Something went wrong with that request. Please try again.