diff options
author | yazevnul <yazevnul@yandex-team.ru> | 2022-02-10 16:46:46 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:46 +0300 |
commit | 8cbc307de0221f84c80c42dcbe07d40727537e2c (patch) | |
tree | 625d5a673015d1df891e051033e9fcde5c7be4e5 /library/cpp/http/fetch | |
parent | 30d1ef3941e0dc835be7609de5ebee66958f215a (diff) | |
download | ydb-8cbc307de0221f84c80c42dcbe07d40727537e2c.tar.gz |
Restoring authorship annotation for <yazevnul@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/http/fetch')
-rw-r--r-- | library/cpp/http/fetch/http_digest.cpp | 4 | ||||
-rw-r--r-- | library/cpp/http/fetch/httpfsm_ut.cpp | 16 | ||||
-rw-r--r-- | library/cpp/http/fetch/httpparser.h | 4 | ||||
-rw-r--r-- | library/cpp/http/fetch/httpparser_ut.cpp | 18 | ||||
-rw-r--r-- | library/cpp/http/fetch/httpzreader.h | 2 |
5 files changed, 22 insertions, 22 deletions
diff --git a/library/cpp/http/fetch/http_digest.cpp b/library/cpp/http/fetch/http_digest.cpp index 1eaa02b7f2..480f4b0c51 100644 --- a/library/cpp/http/fetch/http_digest.cpp +++ b/library/cpp/http/fetch/http_digest.cpp @@ -1,8 +1,8 @@ #include "http_digest.h" #include <library/cpp/digest/md5/md5.h> -#include <util/stream/output.h> -#include <util/stream/str.h> +#include <util/stream/output.h> +#include <util/stream/str.h> /************************************************************/ /************************************************************/ diff --git a/library/cpp/http/fetch/httpfsm_ut.cpp b/library/cpp/http/fetch/httpfsm_ut.cpp index b018e80101..63790456bc 100644 --- a/library/cpp/http/fetch/httpfsm_ut.cpp +++ b/library/cpp/http/fetch/httpfsm_ut.cpp @@ -488,7 +488,7 @@ void THttpHeaderParserTestSuite::TestRepeatedContentEncoding() { UNIT_TEST_SUITE_REGISTRATION(THttpHeaderParserTestSuite); -Y_UNIT_TEST_SUITE(TestHttpChunkParser) { +Y_UNIT_TEST_SUITE(TestHttpChunkParser) { static THttpChunkParser initParser() { THttpChunkParser parser; parser.Init(); @@ -513,7 +513,7 @@ Y_UNIT_TEST_SUITE(TestHttpChunkParser) { return parseByteByByte(blob, states); } - Y_UNIT_TEST(TestWithoutEolHead) { + Y_UNIT_TEST(TestWithoutEolHead) { const TStringBuf blob{ "4\r\n" "____\r\n"}; @@ -527,7 +527,7 @@ Y_UNIT_TEST_SUITE(TestHttpChunkParser) { parseByteByByte(blob, states); } - Y_UNIT_TEST(TestTrivialChunk) { + Y_UNIT_TEST(TestTrivialChunk) { const TStringBuf blob{ "\r\n" "4\r\n"}; @@ -536,7 +536,7 @@ Y_UNIT_TEST_SUITE(TestHttpChunkParser) { UNIT_ASSERT_EQUAL(parser.cnt64, 4); } - Y_UNIT_TEST(TestNegative) { + Y_UNIT_TEST(TestNegative) { const TStringBuf blob{ "\r\n" "-1"}; @@ -547,7 +547,7 @@ Y_UNIT_TEST_SUITE(TestHttpChunkParser) { parseByteByByte(blob, states); } - Y_UNIT_TEST(TestLeadingZero) { + Y_UNIT_TEST(TestLeadingZero) { const TStringBuf blob{ "\r\n" "042\r\n"}; @@ -555,7 +555,7 @@ Y_UNIT_TEST_SUITE(TestHttpChunkParser) { UNIT_ASSERT_EQUAL(parser.chunk_length, 0x42); } - Y_UNIT_TEST(TestIntOverflow) { + Y_UNIT_TEST(TestIntOverflow) { const TStringBuf blob{ "\r\n" "deadbeef"}; @@ -564,7 +564,7 @@ Y_UNIT_TEST_SUITE(TestHttpChunkParser) { UNIT_ASSERT_EQUAL(parser.cnt64, 0xdeadbeef); } - Y_UNIT_TEST(TestTrivialChunkWithTail) { + Y_UNIT_TEST(TestTrivialChunkWithTail) { const TStringBuf blob{ "\r\n" "4\r\n" @@ -577,7 +577,7 @@ Y_UNIT_TEST_SUITE(TestHttpChunkParser) { parseByteByByte(blob, states); } - Y_UNIT_TEST(TestLastChunk) { + Y_UNIT_TEST(TestLastChunk) { // NB: current parser does not permit whitespace before `foo`, // but I've never seen the feature in real-life traffic const TStringBuf blob{ diff --git a/library/cpp/http/fetch/httpparser.h b/library/cpp/http/fetch/httpparser.h index 769828e4ae..078eb5f99d 100644 --- a/library/cpp/http/fetch/httpparser.h +++ b/library/cpp/http/fetch/httpparser.h @@ -207,7 +207,7 @@ protected: size -= long(ChunkParser.lastchar - (char*)buf + 1); buf = ChunkParser.lastchar + 1; ChunkSize = ChunkParser.chunk_length; - Y_ASSERT(ChunkSize >= 0); + Y_ASSERT(ChunkSize >= 0); State = ChunkSize ? hp_read_chunk : hp_eof; } else { Header->entity_size += size; @@ -264,7 +264,7 @@ public: return 0; } long Read(void*& buf) { - Y_ASSERT(Bufsize >= 0); + Y_ASSERT(Bufsize >= 0); if (!Bufsize) { Bufsize = -1; return 0; diff --git a/library/cpp/http/fetch/httpparser_ut.cpp b/library/cpp/http/fetch/httpparser_ut.cpp index 3b3b938e7a..e63964c5f5 100644 --- a/library/cpp/http/fetch/httpparser_ut.cpp +++ b/library/cpp/http/fetch/httpparser_ut.cpp @@ -9,7 +9,7 @@ } template <> -void Out<THttpParserBase::States>(IOutputStream& out, THttpParserBase::States st) { +void Out<THttpParserBase::States>(IOutputStream& out, THttpParserBase::States st) { using type = THttpParserBase::States; switch (st) { ENUM_OUT(hp_error) @@ -46,8 +46,8 @@ namespace { } -Y_UNIT_TEST_SUITE(TestHttpParser) { - Y_UNIT_TEST(TestTrivialRequest) { +Y_UNIT_TEST_SUITE(TestHttpParser) { + Y_UNIT_TEST(TestTrivialRequest) { const TString blob{ "GET /search?q=hi HTTP/1.1\r\n" "Host: www.google.ru:8080 \r\n" @@ -60,7 +60,7 @@ Y_UNIT_TEST_SUITE(TestHttpParser) { } // XXX: `entity_size` is i32 and `content_length` is i64! - Y_UNIT_TEST(TestTrivialResponse) { + Y_UNIT_TEST(TestTrivialResponse) { const TString blob{ "HTTP/1.1 200 Ok\r\n" "Content-Length: 2\r\n" @@ -80,7 +80,7 @@ Y_UNIT_TEST_SUITE(TestHttpParser) { } // XXX: `entity_size` is off by one in TE:chunked case. - Y_UNIT_TEST(TestChunkedResponse) { + Y_UNIT_TEST(TestChunkedResponse) { const TString blob{ "HTTP/1.1 200 OK\r\n" "Transfer-Encoding: chunked\r\n" @@ -130,7 +130,7 @@ Y_UNIT_TEST_SUITE(TestHttpParser) { "\r\n")); } - Y_UNIT_TEST(TestPipelineClenByteByByte) { + Y_UNIT_TEST(TestPipelineClenByteByByte) { const TString& blob = PipelineClenBlob_; THttpHeader hdr; TTestHttpParser parser; @@ -146,7 +146,7 @@ Y_UNIT_TEST_SUITE(TestHttpParser) { } // XXX: Content-Length is ignored, Body() looks unexpected! - Y_UNIT_TEST(TestPipelineClenOneChunk) { + Y_UNIT_TEST(TestPipelineClenOneChunk) { const TString& blob = PipelineClenBlob_; THttpHeader hdr; TTestHttpParser parser; @@ -205,7 +205,7 @@ Y_UNIT_TEST_SUITE(TestHttpParser) { "\r\n")); } - Y_UNIT_TEST(TestPipelineChunkedByteByByte) { + Y_UNIT_TEST(TestPipelineChunkedByteByByte) { const TString& blob = PipelineChunkedBlob_; THttpHeader hdr; TTestHttpParser parser; @@ -220,7 +220,7 @@ Y_UNIT_TEST_SUITE(TestHttpParser) { AssertPipelineChunked(parser, hdr); } - Y_UNIT_TEST(TestPipelineChunkedOneChunk) { + Y_UNIT_TEST(TestPipelineChunkedOneChunk) { const TString& blob = PipelineChunkedBlob_; THttpHeader hdr; TTestHttpParser parser; diff --git a/library/cpp/http/fetch/httpzreader.h b/library/cpp/http/fetch/httpzreader.h index 68eb00853d..fe106dabf7 100644 --- a/library/cpp/http/fetch/httpzreader.h +++ b/library/cpp/http/fetch/httpzreader.h @@ -107,7 +107,7 @@ public: int err = inflate(&Stream, Z_SYNC_FLUSH); - //Y_ASSERT(Stream.avail_in == 0); + //Y_ASSERT(Stream.avail_in == 0); switch (err) { case Z_OK: |