mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-24 16:02:59 +01:00
Expose leaked private ContentDisposition (#406)
This commit is contained in:
parent
6b10e1eff6
commit
2988a84e5f
@ -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()),
|
||||
})
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user