Skip to main content

redirect_target_uri

Function redirect_target_uri 

Source
pub fn redirect_target_uri(
    inv_location: &str,
    new_inv_location: &str,
    target_uri: &str,
) -> String
Expand description

The redirect rule (_load.py:410-419), kept pure: after a fetch that ended somewhere other than where it started, the target URI is rewritten only when it was pointing at the inventory’s own directory.

Not reachable in production — InventoryFetcher returns bytes, not the final URL — but the rule is pinned here so wiring a redirect-aware fetcher later is a change of plumbing, not of policy.