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

effect-house: update livecheck #204216

Merged
merged 1 commit into from
Mar 10, 2025
Merged

effect-house: update livecheck #204216

merged 1 commit into from
Mar 10, 2025

Conversation

khipp
Copy link
Member

@khipp khipp commented Mar 7, 2025

Important: Do not tick a checkbox if you haven’t performed its action. Honesty is indispensable for a smooth review process.

In the following questions <cask> is the token of the cask you're submitting.

After making any changes to a cask, existing or new, verify:

Additionally, if adding a new cask:

  • Named the cask according to the token reference.
  • Checked the cask was not already refused (add your cask's name to the end of the search field).
  • brew audit --cask --new <cask> worked successfully.
  • HOMEBREW_NO_INSTALL_FROM_API=1 brew install --cask <cask> worked successfully.
  • brew uninstall --cask <cask> worked successfully.

@khipp khipp added the livecheck Issues or PRs related to livecheck label Mar 7, 2025
@khipp
Copy link
Member Author

khipp commented Mar 7, 2025

@samford I opened this as a minimal example of an issue that appears to affect the use of the post_form option with the HeaderMatch strategy.

The generated curl request is as follows:

❯ brew livecheck --cask effect-house
/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/bin/bundle clean
/usr/bin/env /opt/homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/4.4.23-75-gdac4c0c-dirty\ \(Macintosh\;\ arm64\ Mac\ OS\ X\ 14.7.4\)\ curl/8.7.1 --header Accept-Language:\ en --connect-timeout 10 --max-time 15 --fail --location --silent --head --request POST --data osType=macOS\&arch=arm64\&entryPoint=104 --max-redirs 5 https://effecthouse.tiktok.com/api/web/download

It seems that the --head and --request POST arguments conflict with each other.

Running it without --silent:

❯ curl --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/4.4.23-75-gdac4c0c-dirty\ \(Macintosh\;\ arm64\ Mac\ OS\ X\ 14.7.4\)\ curl/8.7.1 --header Accept-Language:\ en --connect-timeout 10 --max-time 15 --fail --location --head --request POST --data osType=macOS\&arch=arm64\&entryPoint=104 --max-redirs 5 https://effecthouse.tiktok.com/api/web/download
Warning: You can only select one HTTP request method! You asked for both POST
Warning: (-d, --data) and HEAD (-I, --head).

Running it with --dump-header - instead of --head:

❯ curl --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/4.4.23-75-gdac4c0c-dirty\ \(Macintosh\;\ arm64\ Mac\ OS\ X\ 14.7.4\)\ curl/8.7.1 --header Accept-Language:\ en --connect-timeout 10 --max-time 15 --fail --location --dump-header - --request POST --data osType=macOS\&arch=arm64\&entryPoint=104 --max-redirs 5 https://effecthouse.tiktok.com/api/web/download
HTTP/2 302
content-type: application/json; charset=utf-8
content-length: 2
x-tt-logid: 20250307220727D539BEEEDB99FB0CC84A
location: https://sf16-va.tiktokcdn.com/obj/eden-va2/olaa_ajlmml_zlp/ljhwZthlaukjlkulzlp/V4112_External_Release_02262025/Effect_House_v4.11.2.6777_Applesilicon_104.dmg
x-xss-protection: 1; mode=block
x-frame-options: SAMEORIGIN
x-content-type-options: nosniff
x-download-options: noopen
server-timing: inner; dur=19
x-tt-trace-host: 01838a5937ea615a86689cf8e4268ec2e02878184f83f97fb45a8ca315ba6dec1dbaf36ed92f7764b4962a1d09a7263805ab2c467d26114965d9a4f2b9e2df0b641b97c621a2b42ba26fd2802cd8ec7e90b28a1509c494f1ffb3798d0158edb916
x-tt-trace-id: 00-250307220727D539BEEEDB99FB0CC84A-1597ECBD64DC06D2-00
server: TLB
expires: Fri, 07 Mar 2025 14:07:27 GMT
cache-control: max-age=0, no-cache, no-store
pragma: no-cache
date: Fri, 07 Mar 2025 14:07:27 GMT
x-cache: TCP_MISS from a2-17-217-29.deploy.akamaitechnologies.com (AkamaiGHost/11.8.3-77160ac4eff0ba0794c5b2db5e229965) (-)
x-tt-trace-tag: id=16;cdn-cache=hit;type=dyn
server-timing: cdn-cache; desc=MISS, edge; dur=2, origin; dur=89
x-origin-response-time: 90,2.17.217.29
x-akamai-request-id: 1b155230

HTTP/2 411
server: AkamaiGHost
mime-version: 1.0
content-type: text/html
content-length: 324
cache-control: max-age=2592000
expires: Sun, 06 Apr 2025 14:07:27 GMT
date: Fri, 07 Mar 2025 14:07:27 GMT
x-tt-trace-tag: id=16;cdn-cache=hit;type=static
server-timing: cdn-cache; desc=HIT, edge; dur=0, origin; dur=0
cross-origin-resource-policy: cross-origin
access-control-allow-origin: *

curl: (56) The requested URL returned error: 411

@samford
Copy link
Member

samford commented Mar 7, 2025

Ahh, thanks for letting me know. Looks like I'll have to make some changes to Utils::Curl.page_headers.

Copy link
Member

@samford samford left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have the related brew changes worked out and I'll create a PR after I add/update tests (Homebrew/brew#19445). This check will need a regex and strategy block to work, so I've added a suggestion.

Copy link
Member

@samford samford left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The related brew PR is now merged and this passes CI, so I think this should be good to go.

@bevanjkay bevanjkay marked this pull request as ready for review March 10, 2025 03:08
@bevanjkay bevanjkay merged commit 9773f29 into master Mar 10, 2025
11 checks passed
@bevanjkay bevanjkay deleted the update-effect-house branch March 10, 2025 03:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
livecheck Issues or PRs related to livecheck
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants