mirror of
https://github.com/ziglang/zig.git
synced 2026-02-21 08:45:52 +00:00
std.http.Server: flush by default with respond
This commit is contained in:
parent
97c7d6e5b3
commit
b78e375a2d
@ -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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user