-
Notifications
You must be signed in to change notification settings - Fork 155
Download the database over HTTPS #843
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
base: main
Are you sure you want to change the base?
Conversation
const ADVISORY_DB_DIRECTORY: &str = "advisory-db"; | ||
|
||
/// The default URL from which the DB is downloaded | ||
const DEFAULT_DB_URL: &str = "https://github.com/zip-rs/zip/archive/refs/heads/master.zip"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems bogus in multiple ways... just for testing I guess?
FWIW the tarball seems a lot smaller:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh there's a .tar.gz
? Nice, I'll use that instead!
I already have the streaming .tar.gz
extraction code too, so no need for even the cursor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anything else I should fix here other than switching from .zip to .tar.gz?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good so far otherwise. Hopefully etags work for those resources.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well they do provide an etag in the response, so the worst case is we don't rely on the 304 and instead check the etag in the response headers and stop there. So no worries there.
Part of #750
Not actually wired up to
cargo audit
yet, just shows what the approach might look like