##// END OF EJS Templates
hgweb: refactor repository name URL parsing...
hgweb: refactor repository name URL parsing The hgwebdir WSGI application detects when a requested URL is for a known repository and it effectively forwards the request to the hgweb WSGI application. The hgweb WSGI application needs to route the request based on the base URL for the repository. The way this normally works is SCRIPT_NAME is used to resolve the base URL and PATH_INFO contains the path after the script. But with hgwebdir, SCRIPT_NAME refers to hgwebdir, not the base URL for the repository. So, there was a hacky REPO_NAME environment variable being set to convey the part of the URL that represented the repository so hgweb could ignore this path component for routing purposes. The use of the environment variable for passing internal state is pretty hacky. Plus, it wasn't clear from the perspective of the URL parsing code what was going on. This commit improves matters by making the repository name an explicit argument to the request parser. The logic around handling of this value has been shored up. We add various checks that the argument is used properly - that the repository name does represent the prefix of the PATH_INFO. Differential Revision: https://phab.mercurial-scm.org/D2819

File last commit:

r35792:854a7315 default
r36913:d7fd203e default
Show More
hgrc.5.txt
41 lines | 788 B | text/plain | TextLexer
======
hgrc
======
---------------------------------
configuration files for Mercurial
---------------------------------
:Author: Bryan O'Sullivan <bos@serpentine.com>
:Organization: Mercurial
:Manual section: 5
:Manual group: Mercurial Manual
.. contents::
:backlinks: top
:class: htmlonly
Description
===========
.. include:: hgrc.5.gendoc.txt
Author
======
Bryan O'Sullivan <bos@serpentine.com>.
Mercurial was written by Matt Mackall <mpm@selenic.com>.
See Also
========
|hg(1)|_, |hgignore(5)|_
Copying
=======
This manual page is copyright 2005 Bryan O'Sullivan.
Mercurial is copyright 2005-2018 Matt Mackall.
Free use of this software is granted under the terms of the GNU General
Public License version 2 or any later version.
.. include:: common.txt