Homec4science

Always match full path in URI Mapper

Authored by vrana <jakubv@fb.com> on Mar 1 2012, 20:46.

Description

Always match full path in URI Mapper

Summary:
I am not sure if it is by purpose but Phabricator now process paths like
https://secure.phabricator.com/D1681-so-freaking-cool.
The reason is that there are bunch of rules with missing '$' at the end.
This mistake is so common and easy to create that I've rather removed all '$'
and changed the way how the key is processed.
I am not absolutelly sure if the '$' was missing in some rules by purpose but if
it is the case then we should rather add explicit '.*'.
This change is backwards compatible with custom maps ending with '$'. It is not
compatible with paths not ending with '$' by purpose.

Test Plan:
Visit /, /differential/, /differential/stats/revisions/, /D1681.
Run before and after:

./aphrontpath.php D123
./aphrontpath.php D123-cool
./aphrontpath.php /
./aphrontpath.php differential
./aphrontpath.php differential/
./aphrontpath.php differential/stats/revisions/
./aphrontpath.php /file/data/x/PHID-FILE-y/z

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1745

Details

Committed
vrana <jakubv@fb.com>Mar 2 2012, 00:27
Pushed
aubortJan 31 2017, 17:16
Parents
rPH9b56c7e8a125: Create script printing controller name based on URL
Branches
Unknown
Tags
Unknown

Event Timeline

vrana <jakubv@fb.com> committed rPHeeb7d517c265: Always match full path in URI Mapper (authored by vrana <jakubv@fb.com>).Mar 2 2012, 00:27