#[non_exhaustive]pub enum HttpError {
Show 13 variants
ParseRequestFailed(Error),
ParseResponseFailed(Error),
HeaderTooLong,
ConnectionClosedHeaderIncomplete,
MissingMethod,
OnlyConnectSupported,
OnlyBasicAuthSupported,
InvalidBase64Encoding,
InvalidCredentials,
AuthenticationRequired,
MissingTargetPath,
MissingStatusCode,
HttpError(u16, String),
}http only.Expand description
Errors that can occur during HTTP proxy protocol operations.
Each variant represents a specific error condition that may arise when implementing or using the HTTP proxy protocol, particularly with the CONNECT method.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ParseRequestFailed(Error)
Failed to parse the HTTP request due to a specific httparse error.
ParseResponseFailed(Error)
Failed to parse the HTTP response due to a specific httparse error.
HeaderTooLong
HTTP header section exceeds the maximum buffer size.
ConnectionClosedHeaderIncomplete
Connection was closed before the complete HTTP header was received.
MissingMethod
HTTP request is missing the method field.
OnlyConnectSupported
HTTP proxy implementation only supports the CONNECT method.
OnlyBasicAuthSupported
HTTP proxy authentication only supports the Basic scheme.
InvalidBase64Encoding
Provided authorization header contains invalid Base64 encoding.
InvalidCredentials
Provided username/password combination is incorrect.
AuthenticationRequired
Proxy requires authentication but no credentials were provided.
MissingTargetPath
HTTP CONNECT request is missing the target host:port path.
MissingStatusCode
HTTP response is missing the status code.
HttpError(u16, String)
Server returned an HTTP error with specific status code and reason.