mirror of
https://github.com/servo/servo.git
synced 2025-09-27 15:20:09 +01:00
net: Add spec comments to "cors_preflight_fetch" (#39246)
I added these comments while debugging `cors/request-headers.htm`. Ultimately the bug turned out to be outside of servo, so we have to wait for https://github.com/hyperium/headers/pull/219. Since that PR might take a while to merge I'd like to add these on their own. Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
parent
93ad2cf62a
commit
3b294d0856
2 changed files with 55 additions and 31 deletions
|
@ -878,8 +878,8 @@ fn validate_range_header(value: &str) -> bool {
|
|||
}
|
||||
|
||||
/// <https://fetch.spec.whatwg.org/#cors-safelisted-method>
|
||||
pub fn is_cors_safelisted_method(m: &Method) -> bool {
|
||||
matches!(*m, Method::GET | Method::HEAD | Method::POST)
|
||||
pub fn is_cors_safelisted_method(method: &Method) -> bool {
|
||||
matches!(*method, Method::GET | Method::HEAD | Method::POST)
|
||||
}
|
||||
|
||||
/// <https://fetch.spec.whatwg.org/#cors-non-wildcard-request-header-name>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue