Monorepo for Tangled tangled.org

appview/router: fix url rewriter #798

merged opened by oppi.li targeting master from op/vxnsylzpprzn

the appview rewrites urls of the form:

host.com/did-plc-foo/repo => host.com/did:plc:foo/repo
host.com/@handle.com/repo => host.com/handle.com/repo

however, the rewriter did not preserve query parameters or fragments:

host.com/@handle.com/repo?foo=bar => host.com/handle.com/repo?

this resulted in url rewrites being broken for git clones, which usees the "service" query parameter:

../repo/info/refs?service=git-upload-pack => ../repo/info/refs?

the new url rewriter simply takes the existing url and replaces the path component, thus preserving all other bits of the url.

Signed-off-by: oppiliappan me@oppi.li

Labels

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:qfpnj4og54vl56wngdriaxug/sh.tangled.repo.pull/3m5iylqjlxt22
Interdiff #0 #1
appview/state/router.go

This patch was likely rebased, as context lines do not match.

History

2 rounds 0 comments
sign up or login to add to the discussion
oppi.li submitted #1
1 commit
expand
appview/router: fix url rewriter
3/3 success
expand
expand 0 comments
pull request successfully merged
oppi.li submitted #0
1 commit
expand
appview/router: fix url rewriter
3/3 success
expand
expand 0 comments