Skip to content

Commit

Permalink
simplify h1 dispatcher
Browse files Browse the repository at this point in the history
  • Loading branch information
fafhrd91 committed Oct 2, 2018
1 parent 2217a15 commit 91af3ca
Show file tree
Hide file tree
Showing 8 changed files with 238 additions and 232 deletions.
4 changes: 0 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,6 @@
specialization, // for impl ErrorResponse for std::error::Error
extern_prelude,
))]
#![cfg_attr(
feature = "cargo-clippy",
allow(decimal_literal_representation, suspicious_arithmetic_impl)
)]
#![warn(missing_docs)]

#[macro_use]
Expand Down
12 changes: 12 additions & 0 deletions src/server/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,22 @@ pub enum HttpDispatchError {
#[fail(display = "The first request did not complete within the specified timeout")]
SlowRequestTimeout,

/// Shutdown timeout
#[fail(display = "Connection shutdown timeout")]
ShutdownTimeout,

/// HTTP2 error
#[fail(display = "HTTP2 error: {}", _0)]
Http2(http2::Error),

/// Malformed request
#[fail(display = "Malformed request")]
MalformedRequest,

/// Internal error
#[fail(display = "Internal error")]
InternalError,

/// Unknown error
#[fail(display = "Unknown error")]
Unknown,
Expand Down
Loading

0 comments on commit 91af3ca

Please sign in to comment.