diff options
author | 2023-09-13 21:48:30 -0700 | |
---|---|---|
committer | 2023-09-13 21:48:30 -0700 | |
commit | fa2ef0972b11de2be5ecd5c92f13f56d6890c2ad (patch) | |
tree | b1939d4dbd5e4ed1510e553215a46e3cc0c7223b /src/bun.js/api/server.zig | |
parent | 9976e3f528bae74667a2f4742c4b165b7f68c76d (diff) | |
download | bun-fa2ef0972b11de2be5ecd5c92f13f56d6890c2ad.tar.gz bun-fa2ef0972b11de2be5ecd5c92f13f56d6890c2ad.tar.zst bun-fa2ef0972b11de2be5ecd5c92f13f56d6890c2ad.zip |
fix(Bun.serve) fix buffering edge case (#5152)
* fix buffering clean
* fix resolveMaybeNeedsTrailingSlash and try to fix ci/cd error
* fix resolveMaybeNeedsTrailingSlash and try to fix ci/cd error
* oops
---------
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
Diffstat (limited to 'src/bun.js/api/server.zig')
-rw-r--r-- | src/bun.js/api/server.zig | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/bun.js/api/server.zig b/src/bun.js/api/server.zig index 390f8ef96..ac0f04f34 100644 --- a/src/bun.js/api/server.zig +++ b/src/bun.js/api/server.zig @@ -2723,7 +2723,7 @@ fn NewRequestContext(comptime ssl_enabled: bool, comptime debug_mode: bool, comp } pub fn doRender(this: *RequestContext) void { - ctxLog("render", .{}); + ctxLog("doRender", .{}); if (this.flags.aborted) { this.finalizeForAbort(); @@ -3039,7 +3039,7 @@ fn NewRequestContext(comptime ssl_enabled: bool, comptime debug_mode: bool, comp if (last) { var bytes = this.request_body_buf; - defer this.request_body_buf = .{}; + var old = body.value; const total = bytes.items.len + chunk.len; @@ -3070,6 +3070,7 @@ fn NewRequestContext(comptime ssl_enabled: bool, comptime debug_mode: bool, comp }; // } } + this.request_body_buf = .{}; if (old == .Locked) { var vm = this.server.vm; |