mirror of
https://github.com/ziglang/zig.git
synced 2024-11-13 23:52:57 +00:00
Fix the http.Server test and add it to the set of tests in http.zig
This commit is contained in:
parent
7f3fdd2ff6
commit
59322963ce
@ -274,5 +274,6 @@ const std = @import("std.zig");
|
||||
test {
|
||||
_ = Client;
|
||||
_ = Method;
|
||||
_ = Server;
|
||||
_ = Status;
|
||||
}
|
||||
|
@ -735,9 +735,12 @@ test "HTTP server handles a chunked transfer coding request" {
|
||||
|
||||
const server_thread = try std.Thread.spawn(.{}, (struct {
|
||||
fn apply(s: *std.http.Server) !void {
|
||||
const res = try s.accept(.{ .dynamic = max_header_size });
|
||||
var res = try s.accept(.{
|
||||
.allocator = allocator,
|
||||
.header_strategy = .{ .dynamic = max_header_size },
|
||||
});
|
||||
defer res.deinit();
|
||||
defer res.reset();
|
||||
defer _ = res.reset();
|
||||
try res.wait();
|
||||
|
||||
try expect(res.request.transfer_encoding.? == .chunked);
|
||||
|
Loading…
Reference in New Issue
Block a user