mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Auto merge of #24590 - shnmorimoto:fix-24367, r=jdm
Fix timing allow check <!-- Please describe your changes on the following line: --> Fix #24367 --- <!-- 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 #24367 (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. -->
This commit is contained in:
commit
8abc272d27
1 changed files with 6 additions and 1 deletions
|
@ -1462,7 +1462,12 @@ fn http_network_fetch(
|
|||
_ => false,
|
||||
});
|
||||
|
||||
if !req_origin_in_timing_allow && !wildcard_present {
|
||||
let is_same_origin = request.url_list.iter().all(|url| match request.origin {
|
||||
SpecificOrigin(ref immutable_request_origin) => url.origin() == *immutable_request_origin,
|
||||
_ => false,
|
||||
});
|
||||
|
||||
if !(is_same_origin || req_origin_in_timing_allow || wildcard_present) {
|
||||
context.timing.lock().unwrap().mark_timing_check_failed();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue