# HG changeset patch # User Mads Kiilerich # Date 2020-10-28 14:58:18 # Node ID c387989f868f2d7712de7c4de351969c502cd1fd # Parent 855b37d3bacdc6175566ca7d23c19e2352da1087 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. diff --git a/kallithea/lib/middleware/pygrack.py b/kallithea/lib/middleware/pygrack.py --- a/kallithea/lib/middleware/pygrack.py +++ b/kallithea/lib/middleware/pygrack.py @@ -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