aboutsummaryrefslogtreecommitdiff
path: root/lib/std/http
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2025-08-04 20:27:55 -0700
committerAndrew Kelley <andrew@ziglang.org>2025-08-07 10:04:52 -0700
commitabd76938cb8455891c5a69c33edb7060f42001a3 (patch)
tree879cb79638c8ef3e9a8ed790d255c24073551360 /lib/std/http
parent9e5048c3a5be479d9ad72d1d004d385f2fdc8615 (diff)
downloadzig-abd76938cb8455891c5a69c33edb7060f42001a3.tar.gz
zig-abd76938cb8455891c5a69c33edb7060f42001a3.zip
std.Io.Reader: fix appendRemainingUnlimited
Now it avoids mutating `r` unnecessarily, allowing the `ending` Reader to work.
Diffstat (limited to 'lib/std/http')
-rw-r--r--lib/std/http/test.zig3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/std/http/test.zig b/lib/std/http/test.zig
index df80ca6339..2b8f64c606 100644
--- a/lib/std/http/test.zig
+++ b/lib/std/http/test.zig
@@ -414,7 +414,8 @@ test "general client/server API coverage" {
log.info("{f} {t} {s}", .{ request.head.method, request.head.version, request.head.target });
const gpa = std.testing.allocator;
- const body = try (try request.readerExpectContinue(&.{})).allocRemaining(gpa, .unlimited);
+ const reader = (try request.readerExpectContinue(&.{}));
+ const body = try reader.allocRemaining(gpa, .unlimited);
defer gpa.free(body);
if (mem.startsWith(u8, request.head.target, "/get")) {