mirror of
https://github.com/servo/servo.git
synced 2025-07-16 20:03:39 +01:00
Auto merge of #22119 - atouchet:ua, r=paulrouget
Update Firefox version in user agent string <!-- Please describe your changes on the following line: --> GitHub is again limiting functionality in Servo due to using an outdated Firefox version in the user agent string. Updating this should get rid of the warning. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22119) <!-- Reviewable:end -->
This commit is contained in:
commit
b628b6ef8e
1 changed files with 7 additions and 7 deletions
|
@ -507,28 +507,28 @@ enum UserAgent {
|
||||||
fn default_user_agent_string(agent: UserAgent) -> &'static str {
|
fn default_user_agent_string(agent: UserAgent) -> &'static str {
|
||||||
#[cfg(all(target_os = "linux", target_arch = "x86_64"))]
|
#[cfg(all(target_os = "linux", target_arch = "x86_64"))]
|
||||||
const DESKTOP_UA_STRING: &'static str =
|
const DESKTOP_UA_STRING: &'static str =
|
||||||
"Mozilla/5.0 (X11; Linux x86_64; rv:55.0) Servo/1.0 Firefox/55.0";
|
"Mozilla/5.0 (X11; Linux x86_64; rv:63.0) Servo/1.0 Firefox/63.0";
|
||||||
#[cfg(all(target_os = "linux", not(target_arch = "x86_64")))]
|
#[cfg(all(target_os = "linux", not(target_arch = "x86_64")))]
|
||||||
const DESKTOP_UA_STRING: &'static str =
|
const DESKTOP_UA_STRING: &'static str =
|
||||||
"Mozilla/5.0 (X11; Linux i686; rv:55.0) Servo/1.0 Firefox/55.0";
|
"Mozilla/5.0 (X11; Linux i686; rv:63.0) Servo/1.0 Firefox/63.0";
|
||||||
|
|
||||||
#[cfg(all(target_os = "windows", target_arch = "x86_64"))]
|
#[cfg(all(target_os = "windows", target_arch = "x86_64"))]
|
||||||
const DESKTOP_UA_STRING: &'static str =
|
const DESKTOP_UA_STRING: &'static str =
|
||||||
"Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:55.0) Servo/1.0 Firefox/55.0";
|
"Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:63.0) Servo/1.0 Firefox/63.0";
|
||||||
#[cfg(all(target_os = "windows", not(target_arch = "x86_64")))]
|
#[cfg(all(target_os = "windows", not(target_arch = "x86_64")))]
|
||||||
const DESKTOP_UA_STRING: &'static str =
|
const DESKTOP_UA_STRING: &'static str =
|
||||||
"Mozilla/5.0 (Windows NT 6.1; rv:55.0) Servo/1.0 Firefox/55.0";
|
"Mozilla/5.0 (Windows NT 6.1; rv:63.0) Servo/1.0 Firefox/63.0";
|
||||||
|
|
||||||
#[cfg(not(any(target_os = "linux", target_os = "windows")))]
|
#[cfg(not(any(target_os = "linux", target_os = "windows")))]
|
||||||
// Neither Linux nor Windows, so maybe OS X, and if not then OS X is an okay fallback.
|
// Neither Linux nor Windows, so maybe OS X, and if not then OS X is an okay fallback.
|
||||||
const DESKTOP_UA_STRING: &'static str =
|
const DESKTOP_UA_STRING: &'static str =
|
||||||
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:55.0) Servo/1.0 Firefox/55.0";
|
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:63.0) Servo/1.0 Firefox/63.0";
|
||||||
|
|
||||||
match agent {
|
match agent {
|
||||||
UserAgent::Desktop => DESKTOP_UA_STRING,
|
UserAgent::Desktop => DESKTOP_UA_STRING,
|
||||||
UserAgent::Android => "Mozilla/5.0 (Android; Mobile; rv:55.0) Servo/1.0 Firefox/55.0",
|
UserAgent::Android => "Mozilla/5.0 (Android; Mobile; rv:63.0) Servo/1.0 Firefox/63.0",
|
||||||
UserAgent::iOS => {
|
UserAgent::iOS => {
|
||||||
"Mozilla/5.0 (iPhone; CPU iPhone OS 8_3 like Mac OS X; rv:55.0) Servo/1.0 Firefox/55.0"
|
"Mozilla/5.0 (iPhone; CPU iPhone OS 8_3 like Mac OS X; rv:63.0) Servo/1.0 Firefox/63.0"
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue