backtick -n resource {
cd supported_domains
- backtick -E -n candidate_resource {
- backtick -E -n without_dot_and_dot_dot {
- backtick -E -n without_query_string {
- case -N -- ${requested_resource} {
- "(.*)[?#].*" {
- elgetpositionals
- s6-echo -n -- ${1}
- }
- }
- s6-echo -n -- ${requested_resource}
+ backtick -E -n without_query_string {
+ case -N -- ${requested_resource} {
+ "(.*)[?#].*" {
+ elgetpositionals
+ s6-echo -n -- ${1}
}
- pipeline { clean-dot-directories.execline ${without_query_string} }
- urlencode -d
}
-
- # include the hostname in the final resource name
- s6-echo -n -- ${hostname}/${without_dot_and_dot_dot}
+ s6-echo -n -- ${requested_resource}
+ }
+ backtick -E -n without_dot_and_dot_dot {
+ pipeline { clean-dot-directories.execline ${without_query_string} }
+ urlencode -d
}
+ define candidate_resource ${hostname}/${without_dot_and_dot_dot}
# `${directory}` -> `${directory}/index.xhtml`
ifelse { eltest -d \${candidate_resource} }