1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-12-24 00:50:36 +00:00

Expose leaked private ContentDisposition (#406)

This commit is contained in:
Douman 2018-07-19 20:03:45 +03:00 committed by GitHub
parent 6b10e1eff6
commit 2988a84e5f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View file

@ -66,7 +66,7 @@ pub enum Charset {
}
impl Charset {
fn name(&self) -> &str {
fn label(&self) -> &str {
match *self {
Us_Ascii => "US-ASCII",
Iso_8859_1 => "ISO-8859-1",
@ -90,7 +90,7 @@ impl Charset {
Iso_8859_8_E => "ISO-8859-8-E",
Iso_8859_8_I => "ISO-8859-8-I",
Gb2312 => "GB2312",
Big5 => "5",
Big5 => "big5",
Koi8_R => "KOI8-R",
Ext(ref s) => s,
}
@ -99,7 +99,7 @@ impl Charset {
impl Display for Charset {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.write_str(self.name())
f.write_str(self.label())
}
}
@ -129,7 +129,7 @@ impl FromStr for Charset {
"ISO-8859-8-E" => Iso_8859_8_E,
"ISO-8859-8-I" => Iso_8859_8_I,
"GB2312" => Gb2312,
"5" => Big5,
"big5" => Big5,
"KOI8-R" => Koi8_R,
s => Ext(s.to_owned()),
})

View file

@ -266,6 +266,7 @@ pub mod http {
/// Various http headers
pub mod header {
pub use header::*;
pub use header::{ContentDisposition, DispositionType, DispositionParam, Charset, LanguageTag};
}
pub use header::ContentEncoding;
pub use httpresponse::ConnectionType;