Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

  • Loading branch information...
commit 3c31655386724ef87fa64e02d73eb463aed3f6e8 1 parent 152905a
authored November 08, 2012

Showing 1 changed file with 6 additions and 1 deletion. Show diff stats Hide diff stats

  1. 7  OAuthCore.m
7  OAuthCore.m
@@ -73,7 +73,12 @@ static NSInteger SortParameter(NSString *key1, NSString *key2, void *context) {
73 73
 	}
74 74
 	NSString *normalizedParameterString = [parameterArray componentsJoinedByString:@"&"];
75 75
 	
76  
-	NSString *normalizedURLString = [NSString stringWithFormat:@"%@://%@%@", [url scheme], [url host], [url path]];
  76
+	NSString *normalizedURLString;
  77
+    if ([url port] == nil) {
  78
+        normalizedURLString = [NSString stringWithFormat:@"%@://%@%@", [url scheme], [url host], [url path]];
  79
+    } else {
  80
+        normalizedURLString = [NSString stringWithFormat:@"%@://%@:%@%@", [url scheme], [url host], [url port], [url path]];
  81
+    }
77 82
 	
78 83
 	NSString *signatureBaseString = [NSString stringWithFormat:@"%@&%@&%@",
79 84
 									 [method ab_RFC3986EncodedString],

0 notes on commit 3c31655

Please sign in to comment.
Something went wrong with that request. Please try again.