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

Get the sha1 from the file directly, not through its public URI #1

Merged
merged 2 commits into from
Mar 29, 2021

Conversation

baschny
Copy link
Member

@baschny baschny commented Mar 29, 2021

  1. We should not try to fetch an "Public URI" to apply SHA1 to it, as it won't work:

a) if the URI is not reachable (i.e. in Monocle)
b) if PHP does not allow calling "external URIs" in its stream functions (i.e. with open_basedir restriction)

This should make it more robust, but also make it only work with "resources" from our own packages (which is what we intend anyway).

Also fix the URI if it already might contain a query parameter with "?" to use a "&" separator instead.

  1. also add the "path" as a cache tag, which allows us to clear a particular cached entry if required.

baschny added 2 commits March 29, 2021 11:58
We should not try to fetch an "Public URI" to apply SHA1 to it, as it won't work:
a) if the URI is not reachable
b) if PHP does not allow calling "external URIs" in its stream

This should make it more robust, but also make it only work with "resources" from our own packages
(which is what we intend anyway).

Also fix the URI if it already might contain a query parameter with "?" to use a "&" separator instead.
@baschny baschny merged commit e294d43 into master Mar 29, 2021
@baschny baschny deleted the fix-sha1-fetching branch March 29, 2021 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants