From bf4c6df3a3e1ac6c5969c5b2bd2250be60245de8 Mon Sep 17 00:00:00 2001 From: Xiaoyang Han Date: Thu, 8 Oct 2026 05:41:49 +0800 Subject: [PATCH] fix(mst2): validate raw streams through their exclusive owner Change RawBlobReader access validation to borrow its exclusive owner. The byte producer is Send and deliberately need not be Sync; retaining a shared reference to the whole reader across an await made the actual Axum body future non-Send. This fixes exact #80 native compilation at snapshot_raw_blob.rs189/235 without adding a lock or weakening any first-poll, post-await, EOF or per-delivery access check. All13HTTP regression assertions remain. Formatting, diff and locked offline metadata pass; corrected native execution remains pending. --- src/api/router/snapshot_raw_blob.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/router/snapshot_raw_blob.rs b/src/api/router/snapshot_raw_blob.rs index efda9649..6aee3b5c 100644 --- a/src/api/router/snapshot_raw_blob.rs +++ b/src/api/router/snapshot_raw_blob.rs @@ -232,7 +232,7 @@ impl AsRef<[u8]> for RawBlobChunk { } impl RawBlobReader { - async fn validate(&self) -> Result<(), SnapshotError> { + async fn validate(&mut self) -> Result<(), SnapshotError> { revalidate_access(&self.state, &self.context, &self.headers).await }