Skip to main content

ConfigError

Enum ConfigError 

Source
pub enum ConfigError {
Show 23 variants Env(String), FileOpen { path_to_open: String, io_error: Error, }, FileRead { path_to_read: String, io_error: Error, }, Incompatible { kind: IncompatibilityKind, object: ObjectKind, id: String, }, InvalidFrontendConfig(String), InvalidPath(PathBuf), ListenerAddressAlreadyInUse(SocketAddr), Missing(MissingKind), NoFileParent(String), SaveStatePath(String), SocketPathError(String), DeserializeToml(String), WrongFrontendProtocol(ListenerProtocol), WrongListenerProtocol { expected: ListenerProtocol, found: Option<ListenerProtocol>, }, InvalidAlpnProtocol(String), DisableHttp11WithHttp11Alpn { address: String, }, BufferSizeTooSmallForH2 { buffer_size: u64, minimum: u64, listeners: usize, }, InvalidRedirectPolicy(String), InvalidRedirectScheme(String), InvalidHeaderPosition { index: usize, position: String, }, InvalidHeaderBytes { index: usize, field: &'static str, }, HstsEnabledRequired(String), HstsOnPlainHttp(String),
}

Variants§

§

Env(String)

§

FileOpen

Fields

§path_to_open: String
§io_error: Error
§

FileRead

Fields

§path_to_read: String
§io_error: Error
§

Incompatible

§

InvalidFrontendConfig(String)

§

InvalidPath(PathBuf)

§

ListenerAddressAlreadyInUse(SocketAddr)

§

Missing(MissingKind)

§

NoFileParent(String)

§

SaveStatePath(String)

§

SocketPathError(String)

§

DeserializeToml(String)

§

WrongFrontendProtocol(ListenerProtocol)

§

WrongListenerProtocol

§

InvalidAlpnProtocol(String)

§

DisableHttp11WithHttp11Alpn

disable_http11 = true and alpn_protocols containing "http/1.1" are mutually exclusive: the proxy advertises http/1.1 to peers, then refuses every connection that negotiates it. The combination is a self-DoS at handshake time. Either drop http/1.1 from alpn_protocols or unset disable_http11.

Fields

§address: String
§

BufferSizeTooSmallForH2

buffer_size is below the H2 minimum (16 393 bytes) but at least one HTTPS listener advertises h2 in its ALPN list. The H2 mux requires 16 384-byte frame payload + 9-byte header to fit in a single kawa buffer; smaller values deadlock streams that carry full-size frames. Either raise buffer_size to ≥ 16 393 or remove h2 from the affected listeners’ alpn_protocols.

Fields

§buffer_size: u64
§minimum: u64
§listeners: usize
§

InvalidRedirectPolicy(String)

redirect = "<value>" on a frontend used a value the parser doesn’t recognise. Accepted values are forward, permanent, unauthorized (case-insensitive).

§

InvalidRedirectScheme(String)

redirect_scheme = "<value>" on a frontend used a value the parser doesn’t recognise. Accepted values are use-same, use-http, use-https (case-insensitive).

§

InvalidHeaderPosition

A [[clusters.<id>.frontends.headers]] entry carried an unknown position value. Accepted values are request, response, both (case-insensitive).

Fields

§index: usize
§position: String
§

InvalidHeaderBytes

A [[clusters.<id>.frontends.headers]] entry contains a forbidden byte (NUL, CR, LF, or another C0 control) in its key or value. Accepting these would produce HTTP request/response splitting on the wire (CWE-113) — the worker’s H2 emission path filters them at runtime, but the H1 path serialises raw, so we reject at config-load time as a defense in depth.

Fields

§index: usize
§field: &'static str
§

HstsEnabledRequired(String)

An [hsts] block populated max_age, include_subdomains, or preload but did not set enabled. The TOML representation requires enabled to be present whenever the block is — that single field disambiguates “preserve current” / “explicit disable” / “enable” on hot-reconfig partial updates.

§

HstsOnPlainHttp(String)

An [hsts] block on an HTTP-only listener or frontend. RFC 6797 §7.2 forbids emitting Strict-Transport-Security over plaintext HTTP; sozu rejects the configuration at load time so the non-conformant policy never ships to a worker.

Trait Implementations§

Source§

impl Debug for ConfigError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for ConfigError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for ConfigError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V