aboutsummaryrefslogtreecommitdiff
path: root/tests/t0109-gitconfig.sh
diff options
context:
space:
mode:
authorJohn Keeping <john@keeping.me.uk>2017-10-14 12:02:53 +0000
committerJason A. Donenfeld <Jason@zx2c4.com>2017-10-14 12:31:18 +0000
commit9d751e7eec4f4bc7292be46f2af774fe1adf336a (patch)
tree332b2ed294743969237886944f6b263d8ed0acc6 /tests/t0109-gitconfig.sh
parent1649afdc9b2febe9ab7e1abe1956c5dcaff93aa1 (diff)
downloadcgit-9d751e7eec4f4bc7292be46f2af774fe1adf336a.tar
cgit-9d751e7eec4f4bc7292be46f2af774fe1adf336a.tar.gz
cgit-9d751e7eec4f4bc7292be46f2af774fe1adf336a.zip
parsing: don't clear existing state with empty input
Since commit c699866 (parsing: clear query path before starting, 2017-02-19), we clear the "page" variable simply by calling cgit_parse_url() even if the URL is empty. This breaks a URL like: .../cgit?p=about which is generated when using the "root-readme" configuration option. This happens because "page" is set to "about" when parsing the query string before we handle the path (which is empty, but non-null). It turns out that this is not the only case which is broken, but specifying repository and page via query options has been broken since before the commit mentioned above, for example: .../cgit?r=git&p=log Fix both of these by allowing the previous state to persist if PATH_INFO is empty, falling back to the query parameters if no path has been requested. Reported-by: Tom Ryder <tom@sanctum.geek.nz> Signed-off-by: John Keeping <john@keeping.me.uk>
Diffstat (limited to 'tests/t0109-gitconfig.sh')
0 files changed, 0 insertions, 0 deletions