whereto: support [codes] in .htaccess
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
openstackdocstheme |
New
|
Undecided
|
Unassigned |
Bug Description
(Erroneously opened this as https:/
Discovered via [1], which tried to do a redirectmatch to a target with an #anchor in it.
That wouldn't work (though we can't prove it in CI because the CI docs build doesn't appear to process .htaccess -- which I suppose makes sense as that would entail restarting the build server's httpd? not sure) unless you added the [NE] flag [2]. But (aside from not being able to tell if it worked until published) whereto hates that:
docs run-test: commands[4] | whereto doc/build/
Traceback (most recent call last):
File "/home/
sys.
File "/home/
ruleset.
File "/home/
rule = self._factories
File "/home/
super(
File "/home/
raise ValueError('Could not understand rule {}'.format(params))
ValueError: Could not understand rule ('redirectmatch', '301', '^/nova/
ERROR: InvocationError for command /home/efried/
So this RFE is to beef up whereto to understand these codes. (To be fair, I'm not sure if it should really understand them -- e.g., know that a redirect to /foo.html#bar is /foo.html%23bar without [NE] and /foo.html#bar with it -- or if it should just retain its existing logic but not blow up when there's a fifth field on the .htaccess line. Baby steps?)
[1] https:/
[2] http://