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
+3 -2
Diff #1
+3 -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) 87 86 r.Route("/{name}", func(r chi.Router) { 87 + r.Use(h.resolveRepo) 88 + 88 89 // routes for git operations 89 90 r.Get("/info/refs", h.InfoRefs) 90 91 r.Post("/git-upload-archive", h.UploadArchive) ··· 176 177 return 177 178 } 178 179 179 - ctx := context.WithValue(r.Context(), "repoPath", repoPath) 180 + ctx := context.WithValue(r.Context(), ctxRepoPathKey{}, repoPath) 180 181 next.ServeHTTP(w, r.WithContext(ctx)) 181 182 }) 182 183 }

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
1 commit
expand
knotserver: use correct context key
expand 0 comments