diff options
| author | 2021-12-30 23:20:07 -0800 | |
|---|---|---|
| committer | 2021-12-30 23:20:07 -0800 | |
| commit | ac6a2bf2e5e516162483737bd45d9706559fe6a7 (patch) | |
| tree | 1b005cc8d98d3aaa776e35b94c532ebfc3170019 /src | |
| parent | 3c1cb806d47042a6682a8331d185ef2ed3aa673e (diff) | |
| download | bun-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.zig | 2 |
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) { |
