diff options
author | andrew-iv <andrew-iv@yandex-team.ru> | 2022-02-10 16:49:36 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:36 +0300 |
commit | a7c41f2d250ec4075eb32fb0da0fd5c85308c8f0 (patch) | |
tree | e9434a3e8d049e76df899af7e8f6eb5bd2d5c827 /library/cpp/http/server/http_ex.cpp | |
parent | c617191a3b33c0f5e1be6390361dbe540775d158 (diff) | |
download | ydb-a7c41f2d250ec4075eb32fb0da0fd5c85308c8f0.tar.gz |
Restoring authorship annotation for <andrew-iv@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/http/server/http_ex.cpp')
-rw-r--r-- | library/cpp/http/server/http_ex.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/library/cpp/http/server/http_ex.cpp b/library/cpp/http/server/http_ex.cpp index e07db22bfc..ec82a3dee6 100644 --- a/library/cpp/http/server/http_ex.cpp +++ b/library/cpp/http/server/http_ex.cpp @@ -2,7 +2,7 @@ #include <util/generic/buffer.h> #include <util/generic/cast.h> -#include <util/stream/null.h> +#include <util/stream/null.h> bool THttpClientRequestExtension::Parse(char* req, TBaseServerRequestData& rd) { rd.SetSocket(Socket()); @@ -76,12 +76,12 @@ bool THttpClientRequestExtension::ProcessHeaders(TBaseServerRequestData& rd, TBl } if (!Input().ContentEncoded() && Input().GetContentLength(contentLength)) { - if (contentLength > HttpServ()->Options().MaxInputContentLength) { - Output() << "HTTP/1.1 413 Payload Too Large\r\nContent-Length:0\r\n\r\n"; - Output().Finish(); - return false; - } - + if (contentLength > HttpServ()->Options().MaxInputContentLength) { + Output() << "HTTP/1.1 413 Payload Too Large\r\nContent-Length:0\r\n\r\n"; + Output().Finish(); + return false; + } + TBuffer buf(SafeIntegerCast<size_t>(contentLength)); buf.Resize(Input().Load(buf.Data(), (size_t)contentLength)); postData = TBlob::FromBuffer(buf); |