feat: Allow extra headers to be attached to requests#9
Merged
baszalmstra merged 1 commit intoprefix-dev:mainfrom Feb 23, 2024
Merged
feat: Allow extra headers to be attached to requests#9baszalmstra merged 1 commit intoprefix-dev:mainfrom
baszalmstra merged 1 commit intoprefix-dev:mainfrom
Conversation
baszalmstra
approved these changes
Feb 23, 2024
Collaborator
baszalmstra
left a comment
There was a problem hiding this comment.
This looks good to me, if you can fix CI Id be happy to press the green button.
Thanks!
Collaborator
|
Nvm CI I have to fix the workflow |
Merged
Contributor
Author
|
Thanks for the quick merge and release — let me know if you want me to do more i.e. update the tests (nevermind I see d0530eb now) |
zanieb
added a commit
to astral-sh/uv
that referenced
this pull request
Feb 23, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Because the target URL for requests made during range reads are constructed from the response URL, they lose credentials attached to the URL. This change allows extra headers to be attached to the requests so users can propagate important headers (such as
authorization)Usage looks roughly like this...
An alternative option would be to copy authentication from the request URL to the response URL (as in astral-sh/uv#1874 / uv-auth)
Note this is a breaking API change, I don't see an easy way around it e.g. a helper method like
with_headersdoesn't seem feasible with the way the type is designed.Needed to resolve astral-sh/uv#1709