From b8eaeedd58087462e75f8c95bd8a6032d46cf37c Mon Sep 17 00:00:00 2001 From: Francesco Cozzuto Date: Thu, 18 Dec 2025 13:34:32 +0100 Subject: [PATCH] Increate output buffer limit to 16MB --- chttp.c | 6 +++--- src/client.c | 2 +- src/server.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/chttp.c b/chttp.c index ec62d36..17ee71c 100644 --- a/chttp.c +++ b/chttp.c @@ -3801,7 +3801,7 @@ static void chttp_client_conn_free(CHTTP_ClientConn *conn) int chttp_client_init(CHTTP_Client *client) { client->input_buffer_limit = 1<<20; - client->output_buffer_limit = 1<<20; + client->output_buffer_limit = 1<<24; client->cookie_jar.count = 0; @@ -4633,7 +4633,7 @@ static void chttp_server_conn_free(CHTTP_ServerConn *conn) int chttp_server_init(CHTTP_Server *server) { server->input_buffer_limit = 1<<20; - server->output_buffer_limit = 1<<20; + server->output_buffer_limit = 1<<24; server->trace_bytes = false; server->reuse_addr = false; @@ -4808,7 +4808,7 @@ chttp_server_conn_process_events(CHTTP_Server *server, CHTTP_ServerConn *conn) if (conn->state == CHTTP_SERVER_CONN_BUFFERING) { - int min_recv = 1<<10; + int min_recv = 1<<9; byte_queue_write_setmincap(&conn->input, min_recv); // Note that it's extra important that we don't diff --git a/src/client.c b/src/client.c index cda7bfb..db99cbf 100644 --- a/src/client.c +++ b/src/client.c @@ -8,7 +8,7 @@ static void chttp_client_conn_free(CHTTP_ClientConn *conn) int chttp_client_init(CHTTP_Client *client) { client->input_buffer_limit = 1<<20; - client->output_buffer_limit = 1<<20; + client->output_buffer_limit = 1<<24; client->cookie_jar.count = 0; diff --git a/src/server.c b/src/server.c index e850be8..aafee10 100644 --- a/src/server.c +++ b/src/server.c @@ -20,7 +20,7 @@ static void chttp_server_conn_free(CHTTP_ServerConn *conn) int chttp_server_init(CHTTP_Server *server) { server->input_buffer_limit = 1<<20; - server->output_buffer_limit = 1<<20; + server->output_buffer_limit = 1<<24; server->trace_bytes = false; server->reuse_addr = false; @@ -195,7 +195,7 @@ chttp_server_conn_process_events(CHTTP_Server *server, CHTTP_ServerConn *conn) if (conn->state == CHTTP_SERVER_CONN_BUFFERING) { - int min_recv = 1<<10; + int min_recv = 1<<9; byte_queue_write_setmincap(&conn->input, min_recv); // Note that it's extra important that we don't