Simon Sapin
be69f9c3e6
Rustfmt has changed its default style :/
2018-12-28 13:17:47 +01:00
Jan Andre Ikenmeyer
1d6fe65401
Update MPL license to https (part 4)
2018-11-19 14:47:27 +01:00
Simon Sapin
2012be4a8b
cargo fix --edition-idioms
2018-11-08 09:28:00 +01:00
Pyfisch
cb07debcb6
Format remaining files
2018-11-06 22:30:31 +01:00
Pyfisch
2481ad25f8
Rustfmt net crate
2018-11-03 15:29:01 +01:00
Bastien Orivel
024b40b39d
Update hyper to 0.12
2018-11-01 19:17:36 +01:00
Matt Brubeck
efc3683cc7
Fix commonmark Markdown warnings in docs, part 1
...
Fixes warnings from rust-lang/rust#44229 when `--enable-commonmark` is
passed to rustdoc.
This is mostly a global find-and-replace for bare URIs on lines by
themselves in doc comments.
2017-10-17 11:24:57 -07:00
Simon Sapin
aa5761a5fb
Remove usage of unstable box syntax, except in the script crate
...
… because there’s a lot of it,
and script still uses any other unstable features anyway.
2017-10-12 12:10:56 +02:00
Simon Sapin
316cd35767
Untry
2017-06-18 13:21:51 +02:00
coalman
fc34b9a14d
Fix indentation errors in servo rust code that tidy now finds.
2017-04-18 14:56:13 -04:00
bors-servo
b1d8eff467
Auto merge of #13411 - frewsxcv:mime, r=jdm
...
Migrate mime_classifier top-level string to enum.
I made this branch months ago and forgot about it. Instead of just throwing the changes away, I rebased off origin/master and opened this pull request. If these changes aren't desired, no feelings hurt, just close this. If they are desired, let me know if there are any changes you want me to make and I'll also need to rewrite/squash the commits.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg " height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13411 )
<!-- Reviewable:end -->
2016-10-08 15:40:47 -05:00
Corey Farwell
349e01f6eb
Fix capitalization for enum variants.
2016-10-08 15:48:18 -04:00
Corey Farwell
66303e40b5
Migrate mime_classifier top-level string to enum.
2016-10-08 15:41:58 -04:00
Corey Farwell
6c02a576cf
Rename MIMEClassifier
to match Rust acronym naming conventions.
...
e.g. `std::net::TcpStream`
2016-07-02 17:12:46 -04:00
Corey Farwell
749fe986aa
Create type alias for MIME type.
2016-07-02 17:12:46 -04:00
Josh Matthews
3cb8af20c2
Remove empty lines following braces.
2016-05-27 13:32:05 -04:00
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