+2
-1
knotserver/routes.go
+2
-1
knotserver/routes.go
···
183
183
func (h *Handle) Blob(w http.ResponseWriter, r *http.Request) {
184
184
treePath := chi.URLParam(r, "*")
185
185
ref := chi.URLParam(r, "ref")
186
+
ref, _ = url.PathUnescape(ref)
186
187
187
188
l := h.l.With("handler", "FileContent", "ref", ref, "treePath", treePath)
188
189
···
333
334
334
335
func (h *Handle) Diff(w http.ResponseWriter, r *http.Request) {
335
336
ref := chi.URLParam(r, "ref")
337
+
ref, _ = url.PathUnescape(ref)
336
338
337
339
l := h.l.With("handler", "Diff", "ref", ref)
338
340
···
491
493
return
492
494
}
493
495
494
-
log.Println("branch", data.DefaultBranch)
495
496
if data.DefaultBranch == "" {
496
497
data.DefaultBranch = h.c.Repo.MainBranch
497
498
}