summaryrefslogtreecommitdiff
path: root/src/main.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.zig')
-rw-r--r--src/main.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.zig b/src/main.zig
index 70869b2..11f6d0d 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -39,7 +39,7 @@ const Handler = struct {
fn serve_file(res: *std.http.Server.Response, file: std.fs.File, md: std.fs.File.Metadata) !void {
res.transfer_encoding = .{ .content_length = md.size() };
- try res.do();
+ try res.send();
var buf = [_]u8{0} ** 1024;
while (true) {
const read = try file.read(&buf);
@@ -51,7 +51,7 @@ const Handler = struct {
fn serve_error(res: *std.http.Server.Response, status: std.http.Status) !void {
res.status = status;
res.transfer_encoding = .chunked;
- try res.do();
+ try res.send();
const phrase = status.phrase() orelse "error!";
try std.fmt.format(res.writer(),
\\ <!doctype html><html><body>{s}</body></html>