Use ETag header to check validity of manifests which do not have hashes#40
Open
0x189D7997 wants to merge 6 commits intoWinPlay02:masterfrom
Open
Use ETag header to check validity of manifests which do not have hashes#400x189D7997 wants to merge 6 commits intoWinPlay02:masterfrom
0x189D7997 wants to merge 6 commits intoWinPlay02:masterfrom
Conversation
Contributor
Author
|
Converting back to draft, got an idea to store 'catalogue' manifests (such as |
Contributor
Author
Turns out Mojang root manifest does not support etag. I will have to rely on |
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.
Related to #8
This applies to Skyrising and OrnitheMC manifests and version details, hosting APIs of which support the
etagandIf-None-MatchHTTP headers.Instead of re-downloading them each time, store the ETag value in file attributes when manifests are first acquired and add it to the
If-None-Matchheader in subsequent requests. The server will respond with304 Not Modifiedif the manifest is not outdated.If file system does not support extended attributes, store the ETag in an adjacent file.
fabric-loomuses this exact approach when downloading manifests.Speaking of which I decided to use attribute read/write methods from its
AttributeHelperinstead of implementing my own because they would be functionally (and code-wise) identical.