mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Auto merge of #27655 - ghostd:xhr-user-pass-priority, r=jdm
Fix wrong priority for XHR username/password Fix the wrong priority between the username/password from the URL and the username/password from the 'open' call --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #24953 <!-- Either: --> - [X] 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. -->
This commit is contained in:
commit
0d5e4b9037
2 changed files with 3 additions and 15 deletions
|
@ -390,8 +390,9 @@ impl XMLHttpRequestMethods for XMLHttpRequest {
|
|||
if parsed_url.host().is_some() {
|
||||
if let Some(user_str) = username {
|
||||
parsed_url.set_username(&user_str.0).unwrap();
|
||||
let password = password.as_ref().map(|pass_str| &*pass_str.0);
|
||||
parsed_url.set_password(password).unwrap();
|
||||
}
|
||||
if let Some(pass_str) = password {
|
||||
parsed_url.set_password(Some(&pass_str.0)).unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
[send-authentication-competing-names-passwords.htm]
|
||||
[XMLHttpRequest user/pass options: pass in URL, user in open()]
|
||||
expected: FAIL
|
||||
|
||||
[XMLHttpRequest user/pass options: user in URL, pass in open()]
|
||||
expected: FAIL
|
||||
|
||||
[XMLHttpRequest user/pass options: user/pass in URL; user in open()]
|
||||
expected: FAIL
|
||||
|
||||
[XMLHttpRequest user/pass options: user/pass in URL; pass in open()]
|
||||
expected: FAIL
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue