M12 — the Android client, end to end #2
@@ -186,9 +186,7 @@ pub fn serve(path: &str, query: Option<&str>) -> (u16, String, Vec<u8>) {
|
||||
// A request before the store was published — nothing to serve yet.
|
||||
return (503, "text/plain".into(), Vec::new());
|
||||
};
|
||||
let store = BlobStore {
|
||||
root: root.clone(),
|
||||
};
|
||||
let store = BlobStore { root: root.clone() };
|
||||
// `read` goes through `path`, which rejects anything that isn't a bare sha256 —
|
||||
// so this handler inherits the traversal guard rather than re-implementing it.
|
||||
let Some(bytes) = store.read(requested) else {
|
||||
|
||||
Reference in New Issue
Block a user