%docket: handle both new and old url encoding cases

Avoids having to force all third party developers to push new globs
synchronously with this update. We simultaneously support unencoded and
encoded paths by only url encoded if the unencoded path does not exist
in the glob.
This commit is contained in:
Liam Fitzgerald 2023-12-06 15:00:48 -05:00
parent 312b06a0e2
commit 50fa744d5c

View File

@ -712,7 +712,8 @@
?: =(suffix /desk/js)
%- inline-js-response
(rap 3 'window.desk = "' u.des '";' ~)
=. suffix (turn suffix |=(s=@t (crip (en-urlt:html (trip s)))))
=? suffix !(~(has by glob) suffix)
(turn suffix |=(s=@t (crip (en-urlt:html (trip s)))))
=/ requested
?: (~(has by glob) suffix) suffix
/index/html