Mercurial > kallithea
changeset 8497:c387989f868f stable
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.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Wed, 28 Oct 2020 14:58:18 +0100 |
parents | 855b37d3bacd |
children | cd8fa11c5c89 3669e58f3002 |
files | kallithea/lib/middleware/pygrack.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/lib/middleware/pygrack.py Mon Oct 05 20:43:59 2020 +0200 +++ b/kallithea/lib/middleware/pygrack.py Wed Oct 28 14:58:18 2020 +0100 @@ -125,7 +125,7 @@ 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 @@ 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