Merge pull request #16127 from chenrui333/update-ua

chore(global): update safari user-agent to latest
This commit is contained in:
Mike McQuaid 2023-10-21 09:54:17 +01:00 committed by GitHub
commit 46a8310390
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -47,8 +47,10 @@ HOMEBREW_USER_AGENT_CURL = ENV.fetch("HOMEBREW_USER_AGENT_CURL").freeze
HOMEBREW_USER_AGENT_RUBY =
"#{ENV.fetch("HOMEBREW_USER_AGENT")} ruby/#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}"
HOMEBREW_USER_AGENT_FAKE_SAFARI =
"Mozilla/5.0 (Macintosh; Intel Mac OS X 13_5_1) AppleWebKit/605.1.15 " \
"(KHTML, like Gecko) Version/16.5 Safari/605.1.15"
# Don't update this beyond 10.15.7 until Safari actually updates their
# user agent to be beyond 10.15.7 (not the case as-of macOS 14)
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 " \
"(KHTML, like Gecko) Version/17.0 Safari/605.1.15"
HOMEBREW_GITHUB_PACKAGES_AUTH = ENV.fetch("HOMEBREW_GITHUB_PACKAGES_AUTH").freeze
HOMEBREW_DEFAULT_PREFIX = ENV.fetch("HOMEBREW_GENERIC_DEFAULT_PREFIX").freeze

View File

@ -75,7 +75,7 @@ describe CurlDownloadStrategy do
/curl/,
hash_including(args: array_including_cons(
"--user-agent",
a_string_matching(/Mozilla.*Mac OS X 13.*AppleWebKit/),
a_string_matching(/Mozilla.*Mac OS X 10_15_7.*AppleWebKit/),
)),
)
.at_least(:once)