diff options
author | kulikov <kulikov@yandex-team.ru> | 2022-02-10 16:49:34 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:34 +0300 |
commit | 65e5266709e7ff94b14ae128309e229de714b0df (patch) | |
tree | d4901f06e56d95f5e5d36bd1806bcc144d03bf41 /library/cpp/http/io/stream_ut.cpp | |
parent | 0041d99876ae3dccc3f0fa8787131d85ddfd486b (diff) | |
download | ydb-65e5266709e7ff94b14ae128309e229de714b0df.tar.gz |
Restoring authorship annotation for <kulikov@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 | 98 |
1 files changed, 49 insertions, 49 deletions
diff --git a/library/cpp/http/io/stream_ut.cpp b/library/cpp/http/io/stream_ut.cpp index 1ea35df675..1d78c82e0e 100644 --- a/library/cpp/http/io/stream_ut.cpp +++ b/library/cpp/http/io/stream_ut.cpp @@ -179,63 +179,63 @@ Y_UNIT_TEST_SUITE(THttpStreamTest) { } Y_UNIT_TEST(TestKeepAlive) { - { + { TString s = "GET / HTTP/1.0\r\n\r\n"; - TStringInput si(s); - THttpInput in(&si); - UNIT_ASSERT(!in.IsKeepAlive()); - } - - { + TStringInput si(s); + THttpInput in(&si); + UNIT_ASSERT(!in.IsKeepAlive()); + } + + { TString s = "GET / HTTP/1.0\r\nConnection: keep-alive\r\n\r\n"; - TStringInput si(s); - THttpInput in(&si); - UNIT_ASSERT(in.IsKeepAlive()); - } - - { + TStringInput si(s); + THttpInput in(&si); + UNIT_ASSERT(in.IsKeepAlive()); + } + + { TString s = "GET / HTTP/1.1\r\n\r\n"; - TStringInput si(s); - THttpInput in(&si); - UNIT_ASSERT(in.IsKeepAlive()); - } - - { + TStringInput si(s); + THttpInput in(&si); + UNIT_ASSERT(in.IsKeepAlive()); + } + + { TString s = "GET / HTTP/1.1\r\nConnection: close\r\n\r\n"; - TStringInput si(s); - THttpInput in(&si); - UNIT_ASSERT(!in.IsKeepAlive()); - } - - { + TStringInput si(s); + THttpInput in(&si); + UNIT_ASSERT(!in.IsKeepAlive()); + } + + { TString s = "HTTP/1.0 200 Ok\r\n\r\n"; - TStringInput si(s); - THttpInput in(&si); - UNIT_ASSERT(!in.IsKeepAlive()); - } - - { + TStringInput si(s); + THttpInput in(&si); + UNIT_ASSERT(!in.IsKeepAlive()); + } + + { TString s = "HTTP/1.0 200 Ok\r\nConnection: keep-alive\r\n\r\n"; - TStringInput si(s); - THttpInput in(&si); - UNIT_ASSERT(in.IsKeepAlive()); - } - - { + TStringInput si(s); + THttpInput in(&si); + UNIT_ASSERT(in.IsKeepAlive()); + } + + { TString s = "HTTP/1.1 200 Ok\r\n\r\n"; - TStringInput si(s); - THttpInput in(&si); - UNIT_ASSERT(in.IsKeepAlive()); - } - - { + TStringInput si(s); + THttpInput in(&si); + UNIT_ASSERT(in.IsKeepAlive()); + } + + { TString s = "HTTP/1.1 200 Ok\r\nConnection: close\r\n\r\n"; - TStringInput si(s); - THttpInput in(&si); - UNIT_ASSERT(!in.IsKeepAlive()); - } - } - + TStringInput si(s); + THttpInput in(&si); + UNIT_ASSERT(!in.IsKeepAlive()); + } + } + Y_UNIT_TEST(TestMinRequest) { TString res = "qqqqqq"; TPortManager pm; |