diff options
| author | 2022-02-01 14:41:50 -0800 | |
|---|---|---|
| committer | 2022-02-01 14:41:50 -0800 | |
| commit | 205a6d45b5bf9087c1da898a211930550ed628de (patch) | |
| tree | 23dfc6338452a318abd70b40254c77f296317193 /src | |
| parent | d47e0de1750c9d234febdebeac4415470deea008 (diff) | |
| download | bun-205a6d45b5bf9087c1da898a211930550ed628de.tar.gz bun-205a6d45b5bf9087c1da898a211930550ed628de.tar.zst bun-205a6d45b5bf9087c1da898a211930550ed628de.zip | |
[http] Fix assertion in favicon
Diffstat (limited to 'src')
| -rw-r--r-- | src/http.zig | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/http.zig b/src/http.zig index ebcb1acf0..43caed45f 100644 --- a/src/http.zig +++ b/src/http.zig @@ -106,7 +106,6 @@ pub const RequestContext = struct { const default_favicon = @embedFile("favicon.png"); const default_favicon_shasum = "07877ad4cdfe472cc70759d1f237d358ae1f6a9b"; pub fn sendFavicon(ctx: *RequestContext) !void { - defer ctx.done(); ctx.appendHeader("Content-Type", MimeType.byExtension("png").value); ctx.appendHeader("ETag", default_favicon_shasum); ctx.appendHeader("Age", "0"); @@ -119,6 +118,8 @@ pub const RequestContext = struct { } } + defer ctx.done(); + try ctx.writeStatus(200); try ctx.prepareToSendBody(default_favicon.len, false); try ctx.writeBodyBuf(default_favicon); |
