aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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) {