<div dir="ltr"><div>Hi,</div><div><br></div><div>I was faced with an URL encoding problem which caused a mercurial.error.ProgrammingError in mercurial/hgweb/request.py, line 276:</div><div><br></div><div>"PATH_INFO does not begin with repo name"</div><div><br></div><div>The root cause of the encoding problem is the fact that the wsgi encodes the URL in 'iso-8859-1' but it is in fact utf-8 encoded. It is connected with the use of Python 3.<br></div><div><br></div><div>kallithea/controllers/base.py provides the function which can return the correct path info (get_path_info(environ)).</div><div><br></div><div>So one solution is to patch the environ['PATH_INFO'] with the correct bytestring in BaseVCSController.__call__() using the following patch:</div><div><br></div><div>--- a/kallithea/controllers/base.py     Thu May 27 21:33:45 2021 +0200<br>+++ b/kallithea/controllers/base.py     Thu Aug 19 10:35:16 2021 +0200<br>@@ -330,6 +330,7 @@<br>                 <a href="http://log.info">log.info</a>('%s action on %s repo "%s" by "%s" from %s',<br>                          parsed_request.action, self.scm_alias, parsed_request.repo_name, user.username, ip_addr)<br>                 app = self._make_app(parsed_request)<br>+                environ['PATH_INFO']=get_path_info(environ)<br>                 return app(environ, start_response)<br>             except Exception:<br>                 log.error(traceback.format_exc())</div><div><br></div><div>I have only tested the patch using linux clients. So a test using Windows clients might be feasible.</div><div><br></div><div>/Rüdiger<br></div></div>