Skip to main content

split_provider_route

Function split_provider_route 

Source
pub fn split_provider_route(path: &str) -> Option<(&str, &str)>
Expand description

Split a labelled request path into the provider it names and the path the harness’s client actually asked for.

None when the path carries no label at all, which a proxy must not read as “any provider will do”: it means the request came from something that does not speak this half of the contract — an installed plugin older than the launching client, most likely — and the provider it wanted is simply not knowable from the request.

The remainder always begins with /, including for a bare /_tapes/provider/<name>, so a caller can concatenate it onto an upstream base without a second normalisation rule.