Skip to main content

respond

Function respond 

Source
pub fn respond<B>(
    bundle: &Bundle,
    store: &dyn Store,
    request: &Request<B>,
) -> Response<Vec<u8>>
Expand description

The answer to request: the frames’ file or pack file it names, from the bundle or, for a pack the bundle doesn’t hold, from store; a 405 for another method than GET; a 404 for anything else. Each refusal says why.

The paths it answers are /frames/<hash>/<path>, with the bundle’s hash, and /packs/<place>, where a path is a FilePath, which can’t leave its folder.