Commit graph

36 commits

Author SHA1 Message Date
Corey Farwell
540e5ce6ad Use constructor pattern for ApacheFlag enum. 2016-04-15 18:10:33 -04:00
Jonathan Giddy
4721fd1c6a Fix PDF signature to match spec 2016-02-23 14:09:56 +00:00
Jonathan Giddy
6ea656c6c5 Add check that ByteMatcher pattern has the mask applied 2016-02-23 13:46:53 +00:00
Jonathan Giddy
480cb385fc Fix off-by-one error in MIME pattern matching
This adds a size to the test webp file, since the error fixed occurs
when the test object is the same length as the matched pattern, and
is not equal to the pattern.
2016-02-23 11:53:32 +00:00
Jonathan Giddy
94f5d26131 Use content-type for error message 2016-02-23 10:54:54 +00:00
Jonathan Giddy
ab43e2b028 Ogg has a 5-byte signature, but pattern did not include NUL 2016-02-19 16:51:40 +00:00
Jonathan Giddy
54b07bae91 Fix invalid MIME checkers 2016-02-19 13:11:41 +00:00
Jonathan Giddy
208bae7f2e Add validation code for MIME checkers 2016-02-19 13:11:13 +00:00
Jonathan Giddy
8950d7aa6d Remove extra mask byte in MIME type detection 2016-02-14 08:18:14 +00:00
Jonathan Giddy
ec0ea465ec Calculate mp4 header length correctly. 2016-02-12 17:39:34 +00:00
Josh Matthews
3d8881c6f2 Remove unneeded dead_code annotations. 2015-12-31 07:45:50 -05:00
Josh Matthews
9601d555cd Use valid MIME types in the font classifier. 2015-12-31 07:45:48 -05:00
David Rajchenbach-Teller
1e81b8c133 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 .
2015-12-31 07:45:03 -05:00
jmr0
df49cf2b13 adding tidy rule to warn against use of &String and refactoring instances of &String in codebase 2015-11-25 21:49:12 -05:00
Eli Friedman
1c4962288c MIMEClassifier::classify always succeeds; fix the type to reflect this. 2015-10-13 18:03:40 -07:00
Mathieu Rheaume
cc44448b09 Fix BinaryOrPLaintextClassifier bug with utf16-be & utf16-le and correct tests 2015-09-12 19:59:20 -04:00
Mathieu Rheaume
ff608de781 fixup! Issue #7382 Use descriptive enums instead of booleans for MIMEClassifier::classifer 2015-09-12 17:44:16 -04:00
Mathieu Rheaume
8525495265 Issue #7382 Use descriptive enums instead of booleans for MIMEClassifier::classifer 2015-09-12 17:44:14 -04:00
Simon Martin
5301e59965 Issue #7393: Properly sniff mislabeled feeds. 2015-08-30 13:03:20 +02:00
Johann Tuffe
dd1c8c826e Refactor mime_classifier
Use more iterators in particular.
2015-08-28 22:47:41 +08:00
Sara Tang
8c39e968cd Fixed mismatched type error 2015-08-24 23:11:31 -04:00
Sara Tang
f80ae3402a Fixes for issue #7347 2015-08-24 21:32:16 -04:00
Josh Matthews
8bb853f643 Fix existing syntactics nits. 2015-08-16 10:30:43 -04:00
João Oliveira
0038580abf Replace uses of for foo in bar.iter() and for foo in bar.iter_mut()
closes #7197
2015-08-15 02:27:39 +01:00
Adrián Arroyo Calle
af21c2457e MIME classifier should use &[T] instead of &Vec<T> 2015-08-10 15:00:35 +02:00
Pyfisch
468faf9d43 Remove is_some() from mime_classifier.rs and fix typo "uknown" -> "unknown" 2015-06-23 22:46:22 +02:00
Ms2ger
6a55ae06d7 Remove some as_slice calls. 2015-04-24 17:44:47 +02:00
Mátyás Mustoha
91b4246e1b Fix some irregular indentation. 2015-04-22 21:57:58 +02:00
Edward Cho
d0469dfaf3 move mime classifier unit tests into unit test crate 2015-04-13 15:40:30 -05:00
Mátyás Mustoha
c842e499b3 Fix int-related warnings in net/mime_classifier. 2015-04-08 12:14:36 +02:00
Josh Matthews
9674feebba Cleanup tabs. 2015-04-07 13:25:17 -04:00
Josh Matthews
4a78da1158 Fix unit tests. 2015-04-07 13:25:16 -04:00
Josh Matthews
23ae940abf Enable MIME sniffing for HTTP loads. 2015-04-07 13:25:15 -04:00
Josh Matthews
a3201bc1ac Enable optional mime sniffing, and integrate it with the file loader. 2015-04-06 20:19:30 -04:00
Josh Matthews
2d730f2ae9 Remove the sniffer task. 2015-04-06 19:31:53 -04:00
Nathan Climer
44930b0fb0 Implement MIME sniffing. 2015-04-06 19:01:59 -04:00