diff options
author | mokhotskii <[email protected]> | 2022-08-30 13:12:11 +0300 |
---|---|---|
committer | mokhotskii <[email protected]> | 2022-08-30 13:12:11 +0300 |
commit | e7d0ad21f2f82162d09849c0c4c02522ebc6adf2 (patch) | |
tree | 583208df179bcd15169d5967e82a42636ddfdb94 | |
parent | c0f433ad0372de103c6bac547a8e3cd800ef1740 (diff) |
Fix body parsing behaviour in http_proxy
Fix body parsing behaviour in http_proxy
-rw-r--r-- | ydb/core/http_proxy/http_req.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ydb/core/http_proxy/http_req.cpp b/ydb/core/http_proxy/http_req.cpp index 9a18a7cccd4..c41ecc96dca 100644 --- a/ydb/core/http_proxy/http_req.cpp +++ b/ydb/core/http_proxy/http_req.cpp @@ -722,6 +722,11 @@ namespace NKikimr::NHttpProxy { void THttpRequestContext::RequestBodyToProto(NProtoBuf::Message* request) { auto requestJsonStr = Request->Body; + if (requestJsonStr.empty()) { + throw NKikimr::NSQS::TSQSException(NKikimr::NSQS::NErrors::MALFORMED_QUERY_STRING) << + "Empty body"; + } + std::string bufferStr; switch (ContentType) { case MIME_CBOR: { |