Skip to main content

addressed_to

Function addressed_to 

Source
pub fn addressed_to(request_uri: &Uri, gruu: &Uri) -> bool
Expand description

Whether a request whose Request-URI is request_uri was sent to gruu (§4.5).

Three conditions, and the first is the one RFC 3261 cannot express: both URIs must actually be GRUUs. §5.4 warns that a public GRUU and its address of record are equivalent under §19.1.4, so requiring gr on both sides is what keeps a request aimed at the address of record from being read as one aimed at a single instance.

The rest is §19.1.4 as written: gr is a parameter present in both URIs, so Uri::equivalent already requires the two values to agree — which is what separates one instance’s GRUU from another’s, and a valued gr from a valueless one.