Changeset - c387989f868f
[Not reviewed]
stable
0 1 0
Mads Kiilerich (kiilerix) - 5 years ago 2020-10-28 13:58:18
mads@kiilerich.com
Grafted from: b9c601fdd709
git: fix upload-pack content-type with py3

It is checked earlier that git_command is one of two string constants, and with
py3, things are much simpler and we don't have to consider string coersion.

Reported and debugged by Valentin.
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general) First comment
kallithea/lib/middleware/pygrack.py
Show inline comments
 
@@ -125,7 +125,7 @@ class GitRepository(object):
 
            log.error(traceback.format_exc())
 
            raise exc.HTTPExpectationFailed()
 
        resp = Response()
 
        resp.content_type = 'application/x-%s-advertisement' % str(git_command)
 
        resp.content_type = 'application/x-%s-advertisement' % git_command
 
        resp.charset = None
 
        resp.app_iter = out
 
        return resp
 
@@ -175,7 +175,7 @@ class GitRepository(object):
 
                update_server_info(repo._repo)
 

	
 
        resp = Response()
 
        resp.content_type = 'application/x-%s-result' % git_command.encode('utf-8')
 
        resp.content_type = 'application/x-%s-result' % git_command
 
        resp.charset = None
 
        resp.app_iter = out
 
        return resp
0 comments (0 inline, 0 general) First comment
You need to be logged in to comment. Login now