##// END OF EJS Templates
url-checkers: raise UrlError on acutally failed calls to the path, before we leaked org requests exception out
super-admin -
r1160:04a63439 default
parent child Browse files
Show More
@@ -484,9 +484,9 b' class GitRemote(RemoteBase):'
484 q = {"service": 'git-upload-pack'}
484 q = {"service": 'git-upload-pack'}
485 qs = f'?{urllib.parse.urlencode(q)}'
485 qs = f'?{urllib.parse.urlencode(q)}'
486 cu = f"{test_uri}{qs}"
486 cu = f"{test_uri}{qs}"
487 req = urllib.request.Request(cu, None, {})
488
487
489 try:
488 try:
489 req = urllib.request.Request(cu, None, {})
490 log.debug("Trying to open URL %s", obfuscated_uri)
490 log.debug("Trying to open URL %s", obfuscated_uri)
491 resp = o.open(req)
491 resp = o.open(req)
492 if resp.code != 200:
492 if resp.code != 200:
@@ -502,7 +502,7 b' class GitRemote(RemoteBase):'
502 if b'service=git-upload-pack' in gitdata:
502 if b'service=git-upload-pack' in gitdata:
503 pass
503 pass
504 elif re.findall(br'[0-9a-fA-F]{40}\s+refs', gitdata):
504 elif re.findall(br'[0-9a-fA-F]{40}\s+refs', gitdata):
505 # old style git can return some other format !
505 # old style git can return some other format!
506 pass
506 pass
507 else:
507 else:
508 e = None
508 e = None
@@ -501,9 +501,9 b' class HgRemote(RemoteBase):'
501 q.update({'pairs': "{}-{}".format('0' * 40, '0' * 40)})
501 q.update({'pairs': "{}-{}".format('0' * 40, '0' * 40)})
502 qs = f'?{urllib.parse.urlencode(q)}'
502 qs = f'?{urllib.parse.urlencode(q)}'
503 cu = f"{test_uri}{qs}"
503 cu = f"{test_uri}{qs}"
504 req = urllib.request.Request(cu, None, {})
505
504
506 try:
505 try:
506 req = urllib.request.Request(cu, None, {})
507 log.debug("Trying to open URL %s", obfuscated_uri)
507 log.debug("Trying to open URL %s", obfuscated_uri)
508 resp = o.open(req)
508 resp = o.open(req)
509 if resp.code != 200:
509 if resp.code != 200:
General Comments 0
You need to be logged in to leave comments. Login now