diff options
| author | Gabriel Schneider <[email protected]> | 2026-10-12 17:23:34 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-17 12:15:16 -0300 |
| commit | 9dd6f001c7d5eee987cbd305a79d1b1d011b83f5 (patch) | |
| tree | 2ec5b20565b162b54cdfef9ae5d8fec0e57dfb54 /web/httpfs.zig | |
| parent | 7a07e24916cd5bc762996d81aa1faf550177cd6f (diff) | |
| download | cloud9-9dd6f001c7d5eee987cbd305a79d1b1d011b83f5.tar.gz cloud9-9dd6f001c7d5eee987cbd305a79d1b1d011b83f5.zip | |
Reserve output space for an async completion plus the already-dispatched synchronous handler. Wait on a condition without the catalogue mutex, preserving cancellation and connection-slot lifetime. Abort HTTP streaming on an upstream error instead of hiding a truncated response.
Reproduced the former failure with concurrent live cafe assets. Add exact-hash load checks with 16 readers, mixed HEAD and 40 interrupted downloads; validate 80 multi-frame responses over 37 live files. All five live sites, mounted 9P browsing, protocol/catalogue/host/HTTP/mux/UI tests and 32 original E2E scenarios pass. Deploy corrected service on sole [::]:8090. See docs/namespace-sites-validation.md.
Diffstat (limited to 'web/httpfs.zig')
| -rw-r--r-- | web/httpfs.zig | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/web/httpfs.zig b/web/httpfs.zig index 31c4014..479dd09 100644 --- a/web/httpfs.zig +++ b/web/httpfs.zig @@ -313,7 +313,9 @@ fn FS(comptime M: type) type { if (sent >= limit or data.len == 0) break; offset += data.len; const r = try self.readAt(leaf, offset, self.chunk()); - if (r.msg != .rread) break; + // Do not terminate chunked HTTP successfully after a 9P + // error: the client must detect the incomplete response. + if (r.msg != .rread) return error.Upstream; data = r.msg.rread.data; if (data.len == 0) break; } |
