Implemented a typed Authorization header
An Authorization header contains a Scheme. If you have no real scheme, you can use String as your scheme (Authorization<String>). This includes the `Basic` scheme built-in.
This commit is contained in:
committed by
Sean McArthur
parent
7478f3dfd6
commit
91a8e03e7a
@@ -7,6 +7,7 @@
|
||||
//! is used, such as `ContentType(pub Mime)`.
|
||||
|
||||
pub use self::accept::Accept;
|
||||
pub use self::authorization::Authorization;
|
||||
pub use self::connection::Connection;
|
||||
pub use self::content_length::ContentLength;
|
||||
pub use self::content_type::ContentType;
|
||||
@@ -56,8 +57,8 @@ pub mod user_agent;
|
||||
/// Exposes the Location header.
|
||||
pub mod location;
|
||||
|
||||
pub mod util;
|
||||
|
||||
/// Exposes the Authorization header.
|
||||
pub mod authorization;
|
||||
|
||||
fn from_comma_delimited<T: FromStr>(raw: &[Vec<u8>]) -> Option<Vec<T>> {
|
||||
if raw.len() != 1 {
|
||||
@@ -85,3 +86,4 @@ fn fmt_comma_delimited<T: Show>(fmt: &mut fmt::Formatter, parts: &[T]) -> fmt::R
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
pub mod util;
|
||||
|
||||
Reference in New Issue
Block a user