aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-12-30 23:20:07 -0800
committerGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-12-30 23:20:07 -0800
commitac6a2bf2e5e516162483737bd45d9706559fe6a7 (patch)
tree1b005cc8d98d3aaa776e35b94c532ebfc3170019 /src
parent3c1cb806d47042a6682a8331d185ef2ed3aa673e (diff)
downloadbun-ac6a2bf2e5e516162483737bd45d9706559fe6a7.tar.gz
bun-ac6a2bf2e5e516162483737bd45d9706559fe6a7.tar.zst
bun-ac6a2bf2e5e516162483737bd45d9706559fe6a7.zip
fix occasional HTTP bug
Diffstat (limited to 'src')
-rw-r--r--src/http_client_async.zig2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/http_client_async.zig b/src/http_client_async.zig
index 5f21de2a3..282c61106 100644
--- a/src/http_client_async.zig
+++ b/src/http_client_async.zig
@@ -1493,6 +1493,8 @@ pub fn sendAsync(this: *HTTPClient, body: []const u8, body_out_str: *MutableStri
pub fn send(this: *HTTPClient, body: []const u8, body_out_str: *MutableString) !picohttp.Response {
// this prevents stack overflow
redirect: while (this.remaining_redirect_count >= -1) {
+ body_out_str.reset();
+
if (this.url.isHTTPS()) {
return this.sendHTTPS(body, body_out_str) catch |err| {
switch (err) {