Expand description
Request-path -> (upstream URL, on-disk cache dir) resolution, hardened against path traversal.
Structs§
- RepoRef
- A resolved repository: where to fetch it from and where it is cached.
Functions§
- repo_
name_ from_ path - Strip a smart-HTTP endpoint suffix (
/info/refs,/git-upload-pack) from a request path and return the repo name.Noneif the suffix isn’t present. - resolve
- Validate a repo path (no traversal / absolute / NUL) and resolve it against the upstream base and cache root.