Skip to content

Conversation

@dnephin
Copy link

@dnephin dnephin commented May 6, 2018

Trimming a / from the path / resulted in a broken config.

Example:

paths:
  /:
    repo: repo1

  /middle:
    repo: repo2

Using this config any subpackage in repo1 that sorted before middle would work, but anything after would cause a 404 response. This can be reproduced in TestPathConfigSetFind by changing any paths of "/" in the paths field to "" (which is actually what find() was receiving).

With this patch, / urls are preserved as / and all subpackages of repo1 will be available from the vanity url, so TestPathConfigSetFind accurately reflects the behaviour of find().

Trimming a trailing / would break lookups of subpaths
davidnewhall referenced this pull request in golift/turbovanityurls Jul 18, 2019
davidnewhall referenced this pull request in golift/turbovanityurls Jul 18, 2019
@dnephin dnephin closed this May 14, 2022
@dnephin dnephin deleted the fix-root-paths branch May 14, 2022 16:15
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.

1 participant