mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
Now using eq_ignore_case on WASM mimetype, per #25317
This commit is contained in:
parent
90acd1adc3
commit
1506643f9a
1 changed files with 7 additions and 10 deletions
|
@ -915,16 +915,13 @@ unsafe extern "C" fn consume_stream(
|
||||||
let mimetype = unwrapped_source.Headers().extract_mime_type();
|
let mimetype = unwrapped_source.Headers().extract_mime_type();
|
||||||
|
|
||||||
//Step 2.3 If mimeType is not `application/wasm`, return with a TypeError and abort these substeps.
|
//Step 2.3 If mimeType is not `application/wasm`, return with a TypeError and abort these substeps.
|
||||||
match &mimetype[..] {
|
if !&mimetype[..].eq_ignore_ascii_case(b"application/wasm") {
|
||||||
b"application/wasm" | b"APPLICATION/wasm" | b"APPLICATION/WASM" => {},
|
throw_dom_exception(
|
||||||
_ => {
|
cx,
|
||||||
throw_dom_exception(
|
&global,
|
||||||
cx,
|
Error::Type("Response has unsupported MIME type".to_string()),
|
||||||
&global,
|
);
|
||||||
Error::Type("Response has unsupported MIME type".to_string()),
|
return false;
|
||||||
);
|
|
||||||
return false;
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Step 2.4 If response is not CORS-same-origin, return with a TypeError and abort these substeps.
|
//Step 2.4 If response is not CORS-same-origin, return with a TypeError and abort these substeps.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue