Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #2 from t-yamada/portNumber

Consideration of the case that contains the port number in the URL
  • Loading branch information...
commit 3ce76d5cbf20f17d752e9b8efd65a6ca2360de78 2 parents 152905a + 3c31655
@atebits authored
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],
Please sign in to comment.
Something went wrong with that request. Please try again.