forked from tangled.org/core
this repo has no description

knotserver: urldecode refs

Changed files
+2 -1
knotserver
+2 -1
knotserver/routes.go
···
func (h *Handle) Blob(w http.ResponseWriter, r *http.Request) {
treePath := chi.URLParam(r, "*")
ref := chi.URLParam(r, "ref")
+
ref, _ = url.PathUnescape(ref)
l := h.l.With("handler", "FileContent", "ref", ref, "treePath", treePath)
···
func (h *Handle) Diff(w http.ResponseWriter, r *http.Request) {
ref := chi.URLParam(r, "ref")
+
ref, _ = url.PathUnescape(ref)
l := h.l.With("handler", "Diff", "ref", ref)
···
return
}
-
log.Println("branch", data.DefaultBranch)
if data.DefaultBranch == "" {
data.DefaultBranch = h.c.Repo.MainBranch
}