From 959aa20b6be482436716f7c665905ddb1f23a54c Mon Sep 17 00:00:00 2001 From: David Bernard Date: Sun, 14 Oct 2018 14:45:41 +0200 Subject: [PATCH 1/4] add text/markdown --- src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index acdce3fc..58eb6696 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -501,6 +501,7 @@ names! { CSV, "csv"; EVENT_STREAM, "event-stream"; VCARD, "vcard"; + MARKDOWN, "markdown"; // common application/* JSON, "json"; @@ -656,6 +657,7 @@ mimes! { TEXT_TAB_SEPARATED_VALUES, "text/tab-separated-values", 4; TEXT_TAB_SEPARATED_VALUES_UTF_8, "text/tab-separated-values; charset=utf-8", 4, None, 25; TEXT_VCARD, "text/vcard", 4; + TEXT_MARKDOWN, "text/markdown", 4; IMAGE_STAR, "image/*", 5; IMAGE_JPEG, "image/jpeg", 5; From 743534cc82eda136a7abd5717f876e3f677ba5b3 Mon Sep 17 00:00:00 2001 From: David Bernard Date: Sun, 14 Oct 2018 14:46:25 +0200 Subject: [PATCH 2/4] add text/latex --- src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 58eb6696..ad73a749 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -502,6 +502,7 @@ names! { EVENT_STREAM, "event-stream"; VCARD, "vcard"; MARKDOWN, "markdown"; + LATEX, "latex"; // common application/* JSON, "json"; @@ -658,6 +659,7 @@ mimes! { TEXT_TAB_SEPARATED_VALUES_UTF_8, "text/tab-separated-values; charset=utf-8", 4, None, 25; TEXT_VCARD, "text/vcard", 4; TEXT_MARKDOWN, "text/markdown", 4; + TEXT_LATEX, "text/latex", 4; IMAGE_STAR, "image/*", 5; IMAGE_JPEG, "image/jpeg", 5; From 0acd74d929279a3511ab0c2a2dadd64678dc23d4 Mon Sep 17 00:00:00 2001 From: David Bernard Date: Sun, 14 Oct 2018 15:02:45 +0200 Subject: [PATCH 3/4] add mime types for vega, vegalite, ploty, geojson, fasta --- src/lib.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index ad73a749..f2d0a1a0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -679,6 +679,14 @@ mimes! { APPLICATION_MSGPACK, "application/msgpack", 11; APPLICATION_PDF, "application/pdf", 11; APPLICATION_DNS, "application/dns-message", 11; + APPLICATION_VEGA_V2, "application/vnd.vega.v2+json", 11, Some(23); + APPLICATION_VEGA_V3, "application/vnd.vega.v3+json", 11, Some(23); + APPLICATION_VEGALITE_V1, "application/vnd.vegalite.v1+json", 11, Some(27); + APPLICATION_VEGALITE_V2, "application/vnd.vegalite.v2+json", 11, Some(27); + APPLICATION_VEGALITE_V3, "application/vnd.vegalite.v3+json", 11, Some(27); + APPLICATION_PLOTY, "application/vnd.plotly.v1+json", 11, Some(25); + APPLICATION_GEOJSON, "application/geo+json", 11, Some(15); + APPLICATION_FASTA, "application/vnd.fasta.fasta", 11; MULTIPART_FORM_DATA, "multipart/form-data", 9; } From 8df0e7d1f64d5d207849b07046599535188da697 Mon Sep 17 00:00:00 2001 From: David Bernard Date: Sun, 14 Oct 2018 15:09:42 +0200 Subject: [PATCH 4/4] add name for vega, vegalite, ploty, geojson, fasta --- src/lib.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index f2d0a1a0..fcda2dc4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -510,6 +510,14 @@ names! { MSGPACK, "msgpack"; OCTET_STREAM, "octet-stream"; PDF, "pdf"; + VEGA_V2, "vnd.vega.v2"; + VEGA_V3, "vnd.vega.v3"; + VEGALITE_V1, "vnd.vegalite.v1+json"; + VEGALITE_V2, "vnd.vegalite.v2+json"; + VEGALITE_V3, "vnd.vegalite.v3+json"; + PLOTY, "vnd.plotly.v1+json"; + GEOJSON, "geo+json"; + FASTA, "vnd.fasta.fasta"; // common font/* WOFF, "woff";