Changeset - 75e2d061385a
[Not reviewed]
default
0 1 0
Mads Kiilerich - 6 years ago 2020-03-12 17:06:56
mads@kiilerich.com
vcs: fix validation of Git https URLs (Issue #365)

Fix py3 migration bug.
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/vcs/backends/git/repository.py
Show inline comments
 
@@ -187,13 +187,13 @@ class GitRepository(BaseRepository):
 

	
 
        o = urllib.request.build_opener(*handlers)
 
        o.addheaders = [('User-Agent', 'git/1.7.8.0')]  # fake some git
 

	
 
        req = urllib.request.Request(
 
            "%s?%s" % (
 
                test_uri,
 
                safe_str(test_uri),
 
                urllib.parse.urlencode({"service": 'git-upload-pack'})
 
            ))
 

	
 
        try:
 
            resp = o.open(req)
 
            if resp.code != 200:
0 comments (0 inline, 0 general)