diff options
author | antervis <antervis@yandex-team.ru> | 2022-02-10 16:49:48 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:48 +0300 |
commit | b3eef5b52437f05851a3e8fb489a68db0132657b (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/http | |
parent | 0942f9eeaefcfc84db83fa240d8ed52b99345e7d (diff) | |
download | ydb-b3eef5b52437f05851a3e8fb489a68db0132657b.tar.gz |
Restoring authorship annotation for <antervis@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/http')
-rw-r--r-- | library/cpp/http/fetch/httpparser.h | 8 | ||||
-rw-r--r-- | library/cpp/http/fetch/httpzreader.h | 42 |
2 files changed, 25 insertions, 25 deletions
diff --git a/library/cpp/http/fetch/httpparser.h b/library/cpp/http/fetch/httpparser.h index cc88cbd31d..769828e4ae 100644 --- a/library/cpp/http/fetch/httpparser.h +++ b/library/cpp/http/fetch/httpparser.h @@ -51,7 +51,7 @@ public: protected: int CheckHeaders() { - if (Header->http_status < HTTP_OK || Header->http_status == HTTP_NO_CONTENT || Header->http_status == HTTP_NOT_MODIFIED) { + if (Header->http_status < HTTP_OK || Header->http_status == HTTP_NO_CONTENT || Header->http_status == HTTP_NOT_MODIFIED) { Header->content_length = 0; Header->transfer_chunked = 0; } @@ -65,7 +65,7 @@ protected: Header->error = HTTP_BAD_CONTENT_LENGTH; return 1; } - if (Header->http_status == HTTP_OK) { + if (Header->http_status == HTTP_OK) { if (Header->compression_method != HTTP_COMPRESSION_UNSET && Header->compression_method != HTTP_COMPRESSION_IDENTITY && Header->compression_method != HTTP_COMPRESSION_GZIP && @@ -290,12 +290,12 @@ public: using TBaseT::ParseGeneric; using TBaseT::State; - int Init(THttpHeader* H, int parsHeader, int assumeConnectionClosed = 0, bool headRequest = false) { + int Init(THttpHeader* H, int parsHeader, int assumeConnectionClosed = 0, bool headRequest = false) { Header = H; Eoferr = 1; Size = 0; AssumeConnectionClosed = assumeConnectionClosed; - HeadRequest = headRequest; + HeadRequest = headRequest; return parsHeader ? ParseHeader() : SkipHeader(); } diff --git a/library/cpp/http/fetch/httpzreader.h b/library/cpp/http/fetch/httpzreader.h index c510935ae1..68eb00853d 100644 --- a/library/cpp/http/fetch/httpzreader.h +++ b/library/cpp/http/fetch/httpzreader.h @@ -25,9 +25,9 @@ public: using TBase::ParseGeneric; using TBase::State; - static constexpr size_t DefaultBufSize = 64 << 10; - static constexpr unsigned int DefaultWinSize = 15; - + static constexpr size_t DefaultBufSize = 64 << 10; + static constexpr unsigned int DefaultWinSize = 15; + TCompressedHttpReader() : CompressedInput(false) , BufSize(0) @@ -58,19 +58,19 @@ public: IgnoreTrailingGarbage = ignore; } - int Init( - THttpHeader* H, - int parsHeader, - const size_t maxContSize = Max<size_t>(), - const size_t bufSize = DefaultBufSize, - const unsigned int winSize = DefaultWinSize, - bool headRequest = false) - { + int Init( + THttpHeader* H, + int parsHeader, + const size_t maxContSize = Max<size_t>(), + const size_t bufSize = DefaultBufSize, + const unsigned int winSize = DefaultWinSize, + bool headRequest = false) + { ZErr = 0; CurContSize = 0; MaxContSize = maxContSize; - int ret = TBase::Init(H, parsHeader, ConnectionClosed, headRequest); + int ret = TBase::Init(H, parsHeader, ConnectionClosed, headRequest); if (ret) return ret; @@ -256,15 +256,15 @@ public: { } - int Init( - THttpHeader* H, - int parsHeader, - const size_t maxContSize = Max<size_t>(), - const size_t bufSize = TBase::DefaultBufSize, - const unsigned int winSize = TBase::DefaultWinSize, - bool headRequest = false) - { - int ret = TBase::Init(H, parsHeader, maxContSize, bufSize, winSize, headRequest); + int Init( + THttpHeader* H, + int parsHeader, + const size_t maxContSize = Max<size_t>(), + const size_t bufSize = TBase::DefaultBufSize, + const unsigned int winSize = TBase::DefaultWinSize, + bool headRequest = false) + { + int ret = TBase::Init(H, parsHeader, maxContSize, bufSize, winSize, headRequest); return (int)HandleRetValue((long)ret); } |