mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Resolves #4183 - Implemementing context-based MIME type sniffing
The version of the standard is not finalized at the time of this writing. Specifications may be found here: https://mimesniff.spec.whatwg.org/#context-specific-sniffing .
This commit is contained in:
parent
66c8aa8cda
commit
1e81b8c133
18 changed files with 226 additions and 93 deletions
|
@ -88,7 +88,11 @@ pub fn load(load_data: LoadData,
|
|||
|
||||
let mut metadata = Metadata::default(url);
|
||||
metadata.set_content_type(content_type.as_ref());
|
||||
if let Ok(chan) = start_sending_sniffed_opt(start_chan, metadata, classifier, &bytes) {
|
||||
if let Ok(chan) = start_sending_sniffed_opt(start_chan,
|
||||
metadata,
|
||||
classifier,
|
||||
&bytes,
|
||||
load_data.context) {
|
||||
let _ = chan.send(Payload(bytes));
|
||||
let _ = chan.send(Done(Ok(())));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue