Skip to content

upload: add trailing slash to /legacy repository URLs - #829

Open
00200200 wants to merge 1 commit into
pypa:mainfrom
00200200:fix-legacy-upload-trailing-slash
Open

00200200 wants to merge 1 commit into
pypa:mainfrom
00200200:fix-legacy-upload-trailing-slash

Conversation

@00200200

Copy link
Copy Markdown

Warehouse's legacy upload endpoint is a directory URL. Posting to https://test.pypi.org/legacy (no trailing slash) hits a different resource — 404 when this was first reported, 405 Method Not Allowed today — so flit publish fails if .pypirc omits the slash.

Only that path is rewritten, and only when the request is sent, so keyring lookups against the configured URL stay the same. Other index URLs are left alone.

Fixes #179.

Warehouse treats /legacy and /legacy/ as different resources, so a
.pypirc entry of https://test.pypi.org/legacy does not accept uploads.
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.

404 error when trailing / in upload url ommitted

1 participant