From 0637423277b4e56377d16870bb7ae0a834c0c670 Mon Sep 17 00:00:00 2001 From: Thomas Barnekov Date: Tue, 8 Feb 2022 13:03:02 +0100 Subject: [PATCH] Add HTTP_SEND_RESPONSE_FLAG_BUFFER_DATA flag when streaming response to increase throughput --- Release/src/http/listener/http_server_httpsys.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Release/src/http/listener/http_server_httpsys.cpp b/Release/src/http/listener/http_server_httpsys.cpp index 2eac0baf11..9490227f52 100644 --- a/Release/src/http/listener/http_server_httpsys.cpp +++ b/Release/src/http/listener/http_server_httpsys.cpp @@ -979,7 +979,7 @@ void windows_request_context::async_process_response() StartThreadpoolIo(pServer->m_threadpool_io); const unsigned long error_code = HttpSendHttpResponse(pServer->m_hRequestQueue, m_request_id, - HTTP_SEND_RESPONSE_FLAG_MORE_DATA, + HTTP_SEND_RESPONSE_FLAG_MORE_DATA | HTTP_SEND_RESPONSE_FLAG_BUFFER_DATA, &win_api_response, NULL, NULL, @@ -1197,7 +1197,7 @@ void windows_request_context::send_entity_body(_In_reads_(data_length) unsigned StartThreadpoolIo(pServer->m_threadpool_io); auto error_code = HttpSendResponseEntityBody(pServer->m_hRequestQueue, m_request_id, - this_is_the_last_chunk ? NULL : HTTP_SEND_RESPONSE_FLAG_MORE_DATA, + (this_is_the_last_chunk ? NULL : HTTP_SEND_RESPONSE_FLAG_MORE_DATA) | HTTP_SEND_RESPONSE_FLAG_BUFFER_DATA, 1, &dataChunk, NULL,