feat(uri): add is_absolute method to Uri
				
					
				
			This allows servers to check if an incoming URI is in absolute form. Especially useful for proxies to determine if the request was meant to be proxied or aimed directly at the proxy server.
This commit is contained in:
		| @@ -190,6 +190,14 @@ impl Uri { | ||||
|         }) | ||||
|     } | ||||
|  | ||||
|     /// Returns whether this URI is in `absolute-form`. | ||||
|     /// | ||||
|     /// An example of absolute form is `https://hyper.rs`. | ||||
|     #[inline] | ||||
|     pub fn is_absolute(&self) -> bool { | ||||
|         self.scheme_end.is_some() | ||||
|     } | ||||
|  | ||||
|     #[cfg(test)] | ||||
|     fn fragment(&self) -> Option<&str> { | ||||
|         self.fragment_start.map(|start| { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user