From 1c7c19a9d50c4a36c3e9c86d7721c7175662fe06 Mon Sep 17 00:00:00 2001 From: Glenn Strauss Date: Thu, 13 Aug 2020 20:45:51 -0400 Subject: [PATCH] [core] skip write throttle for 100 Continue (small code simplification) --- src/connections.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/connections.c b/src/connections.c index ad7317ec..3c1fbbd8 100644 --- a/src/connections.c +++ b/src/connections.c @@ -367,11 +367,8 @@ connection_write_100_continue (request_st * const r, connection * const con) * which differs from connection_write_chunkqueue()) */ static const char http_100_continue[] = "HTTP/1.1 100 Continue\r\n\r\n"; - off_t max_bytes = - connection_write_throttle(con, sizeof(http_100_continue)-1); - if (max_bytes < (off_t)sizeof(http_100_continue)-1) { - return 1; /* success; skip sending if throttled to partial */ - } + if (con->traffic_limit_reached) + return 1; /* success; skip sending if throttled */ chunkqueue * const cq = r->write_queue; off_t written = cq->bytes_out;