diff options
| author | myltsev <[email protected]> | 2022-02-10 16:46:03 +0300 | 
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:46:03 +0300 | 
| commit | fc361854fd6ee8d747229b090f0b8018e260d1fb (patch) | |
| tree | 1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /library/cpp/http/io/stream_ut.cpp | |
| parent | 9166d66c30c23c9e85a7c88185a068987148d23f (diff) | |
Restoring authorship annotation for <[email protected]>. Commit 2 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 64b48b4a662..1ea35df675a 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"};  | 
