From 3552de49ead229bb8ced77c87d4530e3c3e3eb03 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Mon, 30 Jan 2017 01:53:29 +0300 Subject: [PATCH] Added comment; fixed uninitialized read [#CLICKHOUSE-20227]. --- dbms/include/DB/IO/WriteBufferFromHTTPServerResponse.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dbms/include/DB/IO/WriteBufferFromHTTPServerResponse.h b/dbms/include/DB/IO/WriteBufferFromHTTPServerResponse.h index 75ec990e8e3..a3cbdfeb9a9 100644 --- a/dbms/include/DB/IO/WriteBufferFromHTTPServerResponse.h +++ b/dbms/include/DB/IO/WriteBufferFromHTTPServerResponse.h @@ -36,13 +36,17 @@ namespace ErrorCodes /// /// Additionally, supports HTTP response compression (in this case corresponding Content-Encoding /// header will be set). +/// +/// Also this class write and flush special X-ClickHouse-Progress HTTP headers +/// if no data was sent at the time of progress notification. +/// This allows to implement progress bar in HTTP clients. class WriteBufferFromHTTPServerResponse : public BufferWithOwnMemory { private: Poco::Net::HTTPServerResponse & response; - bool add_cors_header; - bool compress; + bool add_cors_header = false; + bool compress = false; ZlibCompressionMethod compression_method; int compression_level = Z_DEFAULT_COMPRESSION;