Monorepo for Tangled tangled.org

knotserver: use correct context key #1183

closed opened by boltless.me targeting master from sl/sotxrxskloyn

I have absolutely no idea why #1169 worked fine on my machine, did I forgot to resubmit?

Labels

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:xasnlahkri4ewmbuzly2rlc5/sh.tangled.repo.pull/3mhgpr432o422
+5 -2
Diff #0
+5 -2
knotserver/router.go
··· 83 83 84 84 r.Route("/{did}", func(r chi.Router) { 85 85 r.Use(h.resolveDidRedirect) 86 - r.Use(h.resolveRepo) 86 + 87 87 r.Route("/{name}", func(r chi.Router) { 88 + // TODO: this should go under /{name} 89 + r.Use(h.resolveRepo) 90 + 88 91 // routes for git operations 89 92 r.Get("/info/refs", h.InfoRefs) 90 93 r.Post("/git-upload-archive", h.UploadArchive) ··· 176 179 return 177 180 } 178 181 179 - ctx := context.WithValue(r.Context(), "repoPath", repoPath) 182 + ctx := context.WithValue(r.Context(), ctxRepoPathKey{}, repoPath) 180 183 next.ServeHTTP(w, r.WithContext(ctx)) 181 184 }) 182 185 }

History

2 rounds 1 comment
sign up or login to add to the discussion
1 commit
expand
knotserver: use correct context key
1/3 failed, 2/3 success
expand
expand 1 comment

PR state not changed? why?

closed without merging
boltless.me submitted #0
1 commit
expand
knotserver: use correct context key
expand 0 comments