feat: changed options for http version of requests to upstream app servers

This commit is contained in:
Jun Kurihara 2023-08-09 02:13:04 +09:00
commit 02c333905f
No known key found for this signature in database
GPG key ID: 48ADFD173ED22B03
6 changed files with 35 additions and 23 deletions

View file

@ -7,13 +7,13 @@ pub type Result<T> = std::result::Result<T, RpxyError>;
/// Describes things that can go wrong in the Rpxy
#[derive(Debug, Error)]
pub enum RpxyError {
#[error("Proxy build error")]
#[error("Proxy build error: {0}")]
ProxyBuild(#[from] crate::proxy::ProxyBuilderError),
#[error("Backend build error")]
#[error("Backend build error: {0}")]
BackendBuild(#[from] crate::backend::BackendBuilderError),
#[error("MessageHandler build error")]
#[error("MessageHandler build error: {0}")]
HandlerBuild(#[from] crate::handler::HttpMessageHandlerBuilderError),
#[error("Config builder error: {0}")]
@ -32,40 +32,40 @@ pub enum RpxyError {
#[error("LoadBalance Layer Error: {0}")]
LoadBalance(String),
#[error("I/O Error")]
#[error("I/O Error: {0}")]
Io(#[from] io::Error),
// #[error("Toml Deserialization Error")]
// TomlDe(#[from] toml::de::Error),
#[cfg(feature = "http3-quinn")]
#[error("Quic Connection Error")]
#[error("Quic Connection Error [quinn]: {0}")]
QuicConn(#[from] quinn::ConnectionError),
#[cfg(feature = "http3-s2n")]
#[error("Quic Connection Error [s2n-quic]")]
#[error("Quic Connection Error [s2n-quic]: {0}")]
QUicConn(#[from] s2n_quic::connection::Error),
#[cfg(feature = "http3-quinn")]
#[error("H3 Error")]
#[error("H3 Error [quinn]: {0}")]
H3(#[from] h3::Error),
#[cfg(feature = "http3-s2n")]
#[error("H3 Error [s2n-quic]")]
#[error("H3 Error [s2n-quic]: {0}")]
H3(#[from] s2n_quic_h3::h3::Error),
#[error("rustls Connection Error")]
#[error("rustls Connection Error: {0}")]
Rustls(#[from] rustls::Error),
#[error("Hyper Error")]
#[error("Hyper Error: {0}")]
Hyper(#[from] hyper::Error),
#[error("Hyper Http Error")]
#[error("Hyper Http Error: {0}")]
HyperHttp(#[from] hyper::http::Error),
#[error("Hyper Http HeaderValue Error")]
#[error("Hyper Http HeaderValue Error: {0}")]
HyperHeaderValue(#[from] hyper::header::InvalidHeaderValue),
#[error("Hyper Http HeaderName Error")]
#[error("Hyper Http HeaderName Error: {0}")]
HyperHeaderName(#[from] hyper::header::InvalidHeaderName),
#[error(transparent)]