Skip to content

Conversation

@sjoerdsimons
Copy link
Contributor

Aptly allows create e.g. repos with a / to use those with the REST api
the router needs to allow urlencoded parameters in various places to
represent this. A specific example of this is the /api/repos/:name/packages path

Signed-off-by: Sjoerd Simons sjoerd@collabora.com

Aptly allows create e.g. repos with a / to use those with the REST api
the router needs to allow urlencoded parameters in various places to
represent this. A specific example of this is the /api/repos/:name/packages path

Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
@sjoerdsimons sjoerdsimons force-pushed the sjoerd/raw-router-paths branch from 32553a3 to 93f7aea Compare June 13, 2022 18:40
@randombenj
Copy link
Contributor

So this allows to have urlencoded / in the :name variable in for example /api/repos/:name/packages?

@sjoerdsimons
Copy link
Contributor Author

So this allows to have urlencoded / in the :name variable in for example /api/repos/:name/packages?

Yup exactly we ended up with some repos called "badger/snake" with this change you can GET /api/repos/badger%2Fsnakes/packages, without it gin will treat it the same as /api/repos/badger/snakes/packages and thus error out

@randombenj randombenj self-requested a review June 15, 2022 15:20
@randombenj randombenj merged commit 29deae6 into aptly-dev:master Jun 15, 2022
@randombenj randombenj added this to the 1.5.0 milestone Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants