1
0
mirror of https://github.com/kevin1024/vcrpy.git synced 2025-12-08 16:53:23 +00:00

Updated Request with stup to support default ports

This commit is contained in:
Max Shytikov
2014-05-04 02:06:21 +02:00
parent 5d10a38160
commit 3322234b25
2 changed files with 18 additions and 5 deletions

View File

@@ -28,7 +28,11 @@ class Request(object):
@property
def port(self):
return urlparse(self.uri).port
parse_uri = urlparse(self.uri)
port = parse_uri.port
if port is None:
port = {'https': 433, 'http': 80}[parse_uri.scheme]
return port
@property
def path(self):