about summary refs log tree commit diff
path: root/ui-atom.h
diff options
context:
space:
mode:
authorJohn Keeping <john@keeping.me.uk>2017-10-14 13:02:53 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2017-10-14 14:31:18 +0200
commit9d751e7eec4f4bc7292be46f2af774fe1adf336a (patch)
tree332b2ed294743969237886944f6b263d8ed0acc6 /ui-atom.h
parentui-tree: link to blame UI if enabled (diff)
downloadcgit-pink-9d751e7eec4f4bc7292be46f2af774fe1adf336a.tar.gz
cgit-pink-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 '')
0 files changed, 0 insertions, 0 deletions
amp;id=55866686a80d33e19434a453f583bf716b1d4ac0&follow=1'>Call def_prog_mode after termNoFlowJune McEnroe 2019-02-22Move IRC formatting reset to C-sJune McEnroe 2019-02-22Disable terminal flow controlJune McEnroe 2019-02-22Bind up and down arrows to scrollJune McEnroe 2019-02-22Remove topic TODOJune McEnroe 2019-02-22Add /znc commandJune McEnroe 2019-02-22Update status line after scrolling and term eventsJune McEnroe 2019-02-22Reorganize input.cJune McEnroe 2019-02-22Fix name of <raw> window in man pageJune McEnroe 2019-02-22Rename global tags with angle bracketsJune McEnroe 2019-02-22Show status window while connectingJune McEnroe 2019-02-22Reorganize UI code for the umpteenth timeJune McEnroe 2019-02-21Replace "view" with "window"June McEnroe 2019-02-21Remove ROT13June McEnroe 2019-02-21Clean up man pageJune McEnroe 2019-01-26Draw UI before connectingJune McEnroe 2019-01-25Avoid unused variable warnings with getyxJune McEnroe 2019-01-25Add GNU/Linux build instructionsJune McEnroe