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/misc | |
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/misc')
-rw-r--r-- | library/cpp/http/misc/httpdate.cpp | 6 | ||||
-rw-r--r-- | library/cpp/http/misc/httpdate.h | 2 | ||||
-rw-r--r-- | library/cpp/http/misc/httpdate_ut.cpp | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/library/cpp/http/misc/httpdate.cpp b/library/cpp/http/misc/httpdate.cpp index 4a3031bbf4..1d6617eeec 100644 --- a/library/cpp/http/misc/httpdate.cpp +++ b/library/cpp/http/misc/httpdate.cpp @@ -75,9 +75,9 @@ char* format_http_date(time_t when, char* buf, size_t buflen) { return buf; } - + TString FormatHttpDate(time_t when) { - char str[64] = {0}; + char str[64] = {0}; format_http_date(str, Y_ARRAY_SIZE(str), when); return TString(str); -} +} diff --git a/library/cpp/http/misc/httpdate.h b/library/cpp/http/misc/httpdate.h index 04876f38fe..2a33545a7e 100644 --- a/library/cpp/http/misc/httpdate.h +++ b/library/cpp/http/misc/httpdate.h @@ -17,5 +17,5 @@ inline time_t parse_http_date(const TStringBuf& datestring) { int format_http_date(char buf[], size_t size, time_t when); char* format_http_date(time_t when, char* buf, size_t len); - + TString FormatHttpDate(time_t when); diff --git a/library/cpp/http/misc/httpdate_ut.cpp b/library/cpp/http/misc/httpdate_ut.cpp index c1a0103501..8d700a9593 100644 --- a/library/cpp/http/misc/httpdate_ut.cpp +++ b/library/cpp/http/misc/httpdate_ut.cpp @@ -10,6 +10,6 @@ Y_UNIT_TEST_SUITE(TestHttpDate) { UNIT_ASSERT((int)strlen(format_http_date(0, buf1, sizeof(buf1))) == format_http_date(buf2, sizeof(buf2), 0)); } Y_UNIT_TEST(Test2) { - UNIT_ASSERT_STRINGS_EQUAL(FormatHttpDate(1234567890), "Fri, 13 Feb 2009 23:31:30 GMT"); - } + UNIT_ASSERT_STRINGS_EQUAL(FormatHttpDate(1234567890), "Fri, 13 Feb 2009 23:31:30 GMT"); + } } |