Skip to main content

Module path_resolver

Module path_resolver 

Source
Expand description

Path resolution logic for the mbr server.

This module contains pure functions for determining what resource to serve based on a URL path. By keeping this logic separate from I/O, it becomes easily testable. Every filesystem question it asks goes through a Vault: stat for the probes, resolve_under for containment.

Structs§

OwnedPathResolverConfig
Owned counterpart of PathResolverConfig.
PathResolverConfig
Configuration for path resolution.

Enums§

ResolvedPath
The result of resolving a URL path to a resource.

Functions§

canonical_page_redirect
Decides whether a request that resolved to a markdown page arrived at a non-canonical URL, and if so what to redirect to.
normalize_link_target
Normalizes an authored link target (href) into the request-path form that resolve_request_path expects.
resolve_request_path
Resolves a URL path to determine what resource should be served.
strip_trailing_separator
Strips trailing path separator(s) from a path.