pub enum MessageEndpointError {
Empty,
Absolute,
ProtocolRelative,
IllegalCharacter,
QueryOrFragment,
NotAbsolutePath,
}Expand description
Why a string is not a usable message endpoint.
Variants§
Empty
The value was empty, or was only a query string.
Absolute
The value named a scheme, so it could point anywhere.
See the module docs: this is the refusal that makes the endpoint
event unusable as an SSRF primitive. Reported separately from
ProtocolRelative because the two have
different shapes in a log and a reader wants to know which one a peer
tried.
ProtocolRelative
The value began //, which is a protocol-relative URL.
Its own case and not an Absolute one because it has
no scheme to give it away: //evil.example/steal resolves to
https://evil.example/steal under the client’s own scheme, so a parser
that only looked for :// would walk straight past it.
IllegalCharacter
The value contained a control character or a space.
A request target with a CR in it is a request-line injection: a conforming client cannot send it, and an lenient one can be made to send a second request the user never asked for.
QueryOrFragment
The value already carried a ? or a #, so a query appended to it
would be part of the existing query or of a fragment.
NotAbsolutePath
The value did not begin with /.
Trait Implementations§
Source§impl Clone for MessageEndpointError
impl Clone for MessageEndpointError
Source§impl Debug for MessageEndpointError
impl Debug for MessageEndpointError
Source§impl Display for MessageEndpointError
impl Display for MessageEndpointError
impl Eq for MessageEndpointError
Source§impl Error for MessageEndpointError
impl Error for MessageEndpointError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()