tangled
alpha
login
or
join now
julien.rbrt.fr
/
tangled-core
forked from
tangled.org/core
0
fork
atom
Monorepo for Tangled — https://tangled.org
0
fork
atom
overview
issues
pulls
pipelines
knotserver: urldecode refs
anirudh.fi
11 months ago
76ee27f7
d187bf2b
verified
This commit was signed with the committer's
known signature
.
anirudh.fi
SSH Key Fingerprint:
SHA256:cz35vdbiWEzCNEfuL9fMC2JVIhtXavXBHrRjv8gxpAk=
+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
}