Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use redirected URL as base for relative paths #1816

Merged
merged 1 commit into from
Feb 21, 2024
Merged

Conversation

charliermarsh
Copy link
Member

Summary

If you review the setup in #1747, when we fetch http://localhost:8000/simple/wheel/, it gets redirected to http://localhost:8000/index/wheel/. So any relative paths returned need to be resolved relative to http://localhost:8000/index/wheel/.

Closes #1747.

Test Plan

  • Install proxpi gunicorn pypiserver
  • gunicorn proxpi.server:app --bind 0.0.0.0:8000
  • pypi-server run -p 8080 ~/packages --fallback-url "http://localhost:8000/index" --verbose
  • echo "wheel" | cargo run pip compile - --index-url http://localhost:8080/simple --verbose --no-cache

@charliermarsh charliermarsh added the bug Something isn't working label Feb 21, 2024
@charliermarsh charliermarsh enabled auto-merge (squash) February 21, 2024 15:02
@charliermarsh charliermarsh merged commit cff16f5 into main Feb 21, 2024
7 checks passed
@charliermarsh charliermarsh deleted the charlie/base branch February 21, 2024 15:10
zanieb added a commit that referenced this pull request Feb 22, 2024
…me host (#1874)

Closes #1860


In #1816, we started using the URL
attached to a response instead of the request URL for subsequent
requests — this fixes various bugs but has the side-effect of dropping
credentials from the URL. Here, we transfer credentials from the request
URL to the response URL. We perform RFC compliant checks for safety.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Uv doesn't support index-url fallback as pip
1 participant