diff options
| author | Nameless <truemedian@gmail.com> | 2023-08-23 15:29:50 -0500 |
|---|---|---|
| committer | Nameless <truemedian@gmail.com> | 2023-08-29 21:42:54 -0500 |
| commit | ddef683fcb321882cc912090a25c12bc8705ff55 (patch) | |
| tree | d06228cf7b54f4610d498fe7a7d6c6fda97b0b65 /test | |
| parent | 3817c7382b66bbac0c8f7ea4ff45685bb41b6a63 (diff) | |
| download | zig-ddef683fcb321882cc912090a25c12bc8705ff55.tar.gz zig-ddef683fcb321882cc912090a25c12bc8705ff55.zip | |
std.http.Server: responses to HEAD not allowed to have a payload
Diffstat (limited to 'test')
| -rw-r--r-- | test/standalone/http.zig | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/standalone/http.zig b/test/standalone/http.zig index 5a59544a14..6a503c9338 100644 --- a/test/standalone/http.zig +++ b/test/standalone/http.zig @@ -55,6 +55,8 @@ fn handleRequest(res: *Server.Response) !void { try res.writeAll("Hello, "); try res.writeAll("World!\n"); try res.finish(); + } else { + try testing.expectEqual(res.writeAll("errors"), error.NotWriteable); } } else if (mem.startsWith(u8, res.request.target, "/large")) { res.transfer_encoding = .{ .content_length = 14 * 1024 + 14 * 10 }; |
