-
-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
livecheck: add user_agent #15350
Comments
I think this is likely due to #15099 still being open. |
Nevermind, these are using
Does using a different user agent actually fix that though? Livecheck already uses two different user agents (Homebrew and fake Safari). |
This is a planned feature that I already have implemented locally but it depends on the "options" feature and I need to create a PR for that first (that work is also done but there may be some discussion about the shape of it). I'm working my way towards those PRs but I'm currently working on the GitHub strategy PRs and I also need to wrap up that |
When I try to add the livecheck url for the cask After digging an hour, finally noticed that the reason why those two commands are working in differ is the existence of the user-agent header. Is this feature development ongoing? or should I drop my changes? |
Oh... two of the examples are |
@daeho-ro Oddly enough, I was working on this again yesterday. I had a working implementation when I last left it but I'm reworking the changes to the |
The more I think about this: the more I think we shouldn't be changing/faking our user-agents at all, let alone let them be customised per-formula. Ultimately our user agents being blocked is a response by the upstream project to our requests. We should respect that and do something different rather than just workaround it. |
I agree that we shouldn't use a different user agent if a server specifically blocks requests because This only affects casks at the moment, likely because commercial/closed-source software websites can be more aggressive about blocking atypical requests. We've had some livecheck has had logic to fall back to the In my current implementation, user agent support is simply part of being able to specify 365d install counts for existing casks specifying a adobe-acrobat-pro: 2479 |
Agreed 👍🏻
I'd agree with this 👍🏻
I could see us allowing these to remain if so. |
Verification
brew install wget
. If they do, open an issue at https://github.com/Homebrew/homebrew-core/issues/new/choose instead.Provide a detailed description of the proposed feature
Allow for
user_agent
to be specified forlivecheck
curl requests. In essence, it would reuse the existing implementation from theurl
stanza and apply it to thelivecheck
url if needed.What is the motivation for the feature?
Increasing number of casks are failing livecheck audits due to CDNs blocking the requests. This would add the flexibility to use
user_agent
if needed. See Homebrew/homebrew-cask#146350 Homebrew/homebrew-cask#146223 Homebrew/homebrew-cask#146330 for recent failures.How will the feature be relevant to at least 90% of Homebrew users?
Maintainers will spend less time troubleshooting livechecks which will increase the time they spend on other user-facing projects.
What alternatives to the feature have been considered?
Not implementing it and just skipping CI when the issue comes up.
The text was updated successfully, but these errors were encountered: