def redirect.abs.of
import emerging-ezhttp@0.21.0.0/src/redirect.bend as Redirectimport Base
127# an absolute-path reference's path, dot segments removed, then its query
128def redirect.abs.of(r: Ref) -> String:
129 match r:
130 case Ref{path, query}:
131 redirect.clean(List.tail(&2, String, String.split(path, '/'))) ++ query