-
Notifications
You must be signed in to change notification settings - Fork 2
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
Handle HTTP redirects using reqwest Client builder #29
Merged
Conversation
This file contains 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
With #17 it would be easier to test this |
Added feature to fetch data from a remote URL. |
pothos
reviewed
Nov 24, 2023
pothos
reviewed
Nov 24, 2023
dongsupark
force-pushed
the
dongsu/status-redirect
branch
from
November 24, 2023 16:12
8cf23d6
to
5f1a3a4
Compare
Test like that:
|
pothos
reviewed
Nov 24, 2023
pothos
reviewed
Nov 24, 2023
dongsupark
force-pushed
the
dongsu/status-redirect
branch
from
November 27, 2023 15:20
5f1a3a4
to
a695e42
Compare
pothos
reviewed
Nov 27, 2023
pothos
reviewed
Nov 27, 2023
pothos
reviewed
Nov 27, 2023
pothos
reviewed
Nov 27, 2023
pothos
reviewed
Nov 27, 2023
pothos
reviewed
Nov 27, 2023
pothos
reviewed
Nov 27, 2023
dongsupark
force-pushed
the
dongsu/status-redirect
branch
from
November 28, 2023 12:15
a695e42
to
c1bf7f5
Compare
pothos
reviewed
Nov 28, 2023
pothos
reviewed
Nov 28, 2023
pothos
reviewed
Nov 28, 2023
To be able to handle HTTP redirects, we need to create reqwest Client with its Client builder, which defaults to 10 attempts on redirects. Then it is not necessary to do anything again after receiving HTTP response.
To expose hash_on_disk core logic to other parts like test/update_crau or download_sysext, move that into a common part in src/download.rs.
Adjust test/crau_verify to make it depend on the new library function download::hash_on_disk_sha256.
Add new option --payload-url to fetch data from the given URL into String. Only one of both --input-xml and --payload-url should be given, otherwil fail. Construct a fake package to verify signatures in case of a directly downloaded update payload file. Split the existing signature verification part into do_download_verify, for the fake pacakage code path to rely on the common download and verify part.
dongsupark
force-pushed
the
dongsu/status-redirect
branch
from
November 29, 2023 15:16
c1bf7f5
to
5f6bcdf
Compare
pothos
approved these changes
Nov 29, 2023
dongsupark
added a commit
to flatcar/scripts
that referenced
this pull request
Dec 7, 2023
Update ue-rs to 0.1.0-r4, 2023-12-05. Pulls in flatcar/ue-rs#26, flatcar/ue-rs#29, flatcar/ue-rs#30, flatcar/ue-rs#36, flatcar/ue-rs#37, flatcar/ue-rs#39, flatcar/ue-rs#40.
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.
To be able to handle HTTP redirects, we need to create reqwest Client with its Client builder, which defaults to 10 attempts on redirects.
Then it is not necessary to do anything again after receiving HTTP response.
Fixes #27
Fixes #17