Skip to main content

extract_request_authority

Function extract_request_authority 

Source
pub fn extract_request_authority<B>(
    request: &Request<B>,
) -> Result<Option<Authority>, Error>
Expand description

Extract the authority from a complete request.

The already parsed URI authority takes precedence and is returned without inspecting or validating Host. extract_header_authority is called only when the URI has no authority, so its missing and error behavior applies only to that fallback. If neither source is present, this function returns None. The result is syntactically parsed but is not DNS-resolved or authorized as an origin.