diff --git a/include/types/connection.h b/include/types/connection.h index f8e526ac4..5341a86d6 100644 --- a/include/types/connection.h +++ b/include/types/connection.h @@ -180,6 +180,7 @@ enum { /* flags that can be passed to xprt->snd_buf() */ enum { CO_SFL_MSG_MORE = 0x0001, /* More data to come afterwards */ + CO_SFL_STREAMER = 0x0002, /* Producer is continuously streaming data */ }; /* xprt_ops describes transport-layer operations for a connection. They diff --git a/src/ssl_sock.c b/src/ssl_sock.c index 19505e5ee..5ac2b0653 100644 --- a/src/ssl_sock.c +++ b/src/ssl_sock.c @@ -1528,7 +1528,8 @@ static int ssl_sock_from_buf(struct connection *conn, struct buffer *buf, int fl while (buf->o) { try = bo_contig_data(buf); - if (global.tune.ssl_max_record && try > global.tune.ssl_max_record) + if (!(flags & CO_SFL_STREAMER) && + global.tune.ssl_max_record && try > global.tune.ssl_max_record) try = global.tune.ssl_max_record; ret = SSL_write(conn->xprt_ctx, bo_ptr(buf), try); diff --git a/src/stream_interface.c b/src/stream_interface.c index 967f6451c..b3364a3a9 100644 --- a/src/stream_interface.c +++ b/src/stream_interface.c @@ -701,6 +701,9 @@ static void si_conn_send(struct connection *conn) ((chn->flags & (CF_SHUTW|CF_SHUTW_NOW)) == CF_SHUTW_NOW)) send_flag |= CO_SFL_MSG_MORE; + if (chn->flags & CF_STREAMER) + send_flag |= CO_SFL_STREAMER; + ret = conn->xprt->snd_buf(conn, chn->buf, send_flag); if (ret > 0) { chn->flags |= CF_WRITE_PARTIAL;