diff --git a/lib/std/http/Server.zig b/lib/std/http/Server.zig index cab82b6fb1..4f8866e532 100644 --- a/lib/std/http/Server.zig +++ b/lib/std/http/Server.zig @@ -303,6 +303,15 @@ pub const Request = struct { request: *Request, content: []const u8, options: RespondOptions, + ) std.io.Writer.Error!void { + try respondUnflushed(request, content, options); + try request.server.out.flush(); + } + + pub fn respondUnflushed( + request: *Request, + content: []const u8, + options: RespondOptions, ) std.io.Writer.Error!void { assert(options.status != .@"continue"); if (std.debug.runtime_safety) {