We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1ba3d8b commit af21fa8Copy full SHA for af21fa8
oauth/oauth.py
@@ -202,10 +202,10 @@ def get_normalized_http_url(http://github.com/self):
202
parts = urlparse.urlparse(self.http_url)
203
scheme, netloc, path = parts[:3]
204
# Exclude default port numbers.
205
- if scheme == 'http':
206
- netloc = netloc.rstrip(':80')
207
- elif scheme == 'https':
208
- netloc = netloc.rstrip(':443')
+ if scheme == 'http' and netloc[-3:] == ':80':
+ netloc = netloc[:-3]
+ elif scheme == 'https' and netloc[-4:] == ':443':
+ netloc = netloc[:-4]
209
return '%s://%s%s' % (scheme, netloc, path)
210
211
def sign_request(self, signature_method, consumer, token):
0 commit comments