Skip to main content

split_authority

Function split_authority 

Source
pub fn split_authority(authority: &str) -> Result<(String, u16), &'static str>
Expand description

Splits a CONNECT :authority into host and port.

RFC 9114 ยง4.4 requires authority-form (host:port), with IPv6 literals in brackets as per RFC 3986.

Public for the reason super::udp::parse_target is: the two are the same decision reached along the two routes a client can name a target by, what comes out of either is what gets dialled, and reaching one through a live tunnel costs a QUIC connection per input. fuzz/fuzz_targets/authority.rs holds both to the same invariants.