diff options
author | myltsev <myltsev@yandex-team.ru> | 2022-02-10 16:46:03 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:03 +0300 |
commit | 9166d66c30c23c9e85a7c88185a068987148d23f (patch) | |
tree | 421bdcec5755d9e441c485560aab5ab8d74c7475 /library/cpp/http/io/stream_ut.cpp | |
parent | 8d3a5ed3a188a34167eaee54f1691ce5c9edf2f3 (diff) | |
download | ydb-9166d66c30c23c9e85a7c88185a068987148d23f.tar.gz |
Restoring authorship annotation for <myltsev@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/http/io/stream_ut.cpp')
-rw-r--r-- | library/cpp/http/io/stream_ut.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/library/cpp/http/io/stream_ut.cpp b/library/cpp/http/io/stream_ut.cpp index 1ea35df675..64b48b4a66 100644 --- a/library/cpp/http/io/stream_ut.cpp +++ b/library/cpp/http/io/stream_ut.cpp @@ -420,27 +420,27 @@ Y_UNIT_TEST_SUITE(THttpStreamTest) { } Y_UNIT_TEST(ContentLengthRemoval) { - TMemoryInput request("GET / HTTP/1.1\r\nAccept-Encoding: gzip\r\n\r\n"); - THttpInput i(&request); + TMemoryInput request("GET / HTTP/1.1\r\nAccept-Encoding: gzip\r\n\r\n"); + THttpInput i(&request); TString result; - TStringOutput out(result); - THttpOutput httpOut(&out, &i); - - httpOut.EnableKeepAlive(true); - httpOut.EnableCompression(true); - httpOut << "HTTP/1.1 200 OK\r\n"; - char answer[] = "Mary had a little lamb."; + TStringOutput out(result); + THttpOutput httpOut(&out, &i); + + httpOut.EnableKeepAlive(true); + httpOut.EnableCompression(true); + httpOut << "HTTP/1.1 200 OK\r\n"; + char answer[] = "Mary had a little lamb."; httpOut << "Content-Length: " << strlen(answer) << "\r\n" "\r\n"; - httpOut << answer; - httpOut.Finish(); - - Cdbg << result; - result.to_lower(); - UNIT_ASSERT(result.Contains("content-encoding: gzip")); - UNIT_ASSERT(!result.Contains("content-length")); - } - + httpOut << answer; + httpOut.Finish(); + + Cdbg << result; + result.to_lower(); + UNIT_ASSERT(result.Contains("content-encoding: gzip")); + UNIT_ASSERT(!result.Contains("content-length")); + } + Y_UNIT_TEST(CodecsPriority) { TMemoryInput request("GET / HTTP/1.1\r\nAccept-Encoding: gzip, br\r\n\r\n"); TVector<TStringBuf> codecs = {"br", "gzip"}; |