Commit 7f9fa573 authored by Abiola Ibrahim's avatar Abiola Ibrahim

Rewrite: Use only `fragment`, remove `frag`.

parent 0e039a18
......@@ -41,7 +41,6 @@ func NewReplacer(r *http.Request, rr *responseRecorder, emptyValue string) Repla
"{host}": r.Host,
"{path}": r.URL.Path,
"{query}": r.URL.RawQuery,
"{frag}": r.URL.Fragment,
"{fragment}": r.URL.Fragment,
"{proto}": r.Proto,
"{remote}": func() string {
......
......@@ -28,7 +28,7 @@ func TestRewrite(t *testing.T) {
[]string{"/ab/", "ab", "/ab?type=html&{query}", ".html|"},
[]string{"/abc/", "ab", "/abc/{file}", ".html|"},
[]string{"/abcd/", "ab", "/a/{dir}/{file}", ".html|"},
[]string{"/abcde/", "ab", "/a#{frag}", ".html|"},
[]string{"/abcde/", "ab", "/a#{fragment}", ".html|"},
[]string{"/ab/", `.*\.jpg`, "/ajpg", ""},
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment