tangled
alpha
login
or
join now
willdot.net
/
tangled-fork
forked from
tangled.org/core
0
fork
atom
Monorepo for Tangled
0
fork
atom
overview
issues
pulls
pipelines
knotserver: urldecode refs
anirudh.fi
1 year ago
71799c83
3e0f49fa
+2
-1
1 changed file
expand all
collapse all
unified
split
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
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
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
494
-
log.Println("branch", data.DefaultBranch)
495
496
if data.DefaultBranch == "" {
496
497
data.DefaultBranch = h.c.Repo.MainBranch
497
498
}