зеркало из https://github.com/mozilla/gecko-dev.git
servo: Merge #18617 - Removed integrity check and test for no-cors requests (from TheDan64:master); r=KiChjang
Removed Step 30.2 which raised a JS TypeError if the integrity metadata was not empty. I manually ran `new Request("", {"mode" : "no-cors", "integrity" : "not an empty string"});` in servo to validate that the exception no longer arose. --- <!-- 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 #18345 - [x] These changes do not require tests because according to the ticket "Unfortunately, there's no automated test available for this yet because we are having trouble updating our copy of the upstream tests. " Source-Repo: https://github.com/servo/servo Source-Revision: e6099b43646520a4d0076bfc50dcc65b1aa8eb6b --HG-- extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear extra : subtree_revision : f28fc96a6fda0faca8cc43833f9b50058c2c9f6f
This commit is contained in:
Родитель
d3e557a199
Коммит
174f01216c
|
@ -324,10 +324,6 @@ impl Request {
|
||||||
"The mode is 'no-cors' but the method is not a cors-safelisted method".to_string()));
|
"The mode is 'no-cors' but the method is not a cors-safelisted method".to_string()));
|
||||||
}
|
}
|
||||||
// Step 30.2
|
// Step 30.2
|
||||||
if !borrowed_request.integrity_metadata.is_empty() {
|
|
||||||
return Err(Error::Type("Integrity metadata is not an empty string".to_string()));
|
|
||||||
}
|
|
||||||
// Step 30.3
|
|
||||||
r.Headers().set_guard(Guard::RequestNoCors);
|
r.Headers().set_guard(Guard::RequestNoCors);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче