aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/http/push_parser/http_parser.cpp
diff options
context:
space:
mode:
authorrobot-piglet <robot-piglet@yandex-team.com>2023-09-18 13:07:44 +0300
committerrobot-piglet <robot-piglet@yandex-team.com>2023-09-18 13:27:47 +0300
commit1c65609dbbbc8bdc00ee5138f0c0385e4c07c298 (patch)
tree4360513a459f3f24ca88d1f7cf79255862dc1125 /library/cpp/http/push_parser/http_parser.cpp
parent1a51d3f4e6a171eb78d2a4b41719a4a07541e3e3 (diff)
downloadydb-1c65609dbbbc8bdc00ee5138f0c0385e4c07c298.tar.gz
Intermediate changes
Diffstat (limited to 'library/cpp/http/push_parser/http_parser.cpp')
-rw-r--r--library/cpp/http/push_parser/http_parser.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/library/cpp/http/push_parser/http_parser.cpp b/library/cpp/http/push_parser/http_parser.cpp
index 5852a02d5b..b69818c15c 100644
--- a/library/cpp/http/push_parser/http_parser.cpp
+++ b/library/cpp/http/push_parser/http_parser.cpp
@@ -108,7 +108,7 @@ bool THttpParser::HeadersParser() {
bool THttpParser::ContentParser() {
DBGOUT("Content parsing()");
- if (HasContentLength_) {
+ if (HasContentLength_ && !BodyNotExpected_) {
size_t rd = Min<size_t>(DataEnd_ - Data_, ContentLength_ - Content_.size());
Content_.append(Data_, rd);
Data_ += rd;
@@ -119,8 +119,8 @@ bool THttpParser::ContentParser() {
} else {
if (MessageType_ == Request) {
return OnEndParsing(); //RFC2616 4.4-5
- } else if (Y_UNLIKELY(RetCode() < 200 || RetCode() == 204 || RetCode() == 304)) {
- return OnEndParsing(); //RFC2616 4.4-1 (but not checked HEAD request type !)
+ } else if (Y_UNLIKELY(BodyNotExpected_ || RetCode() < 200 || RetCode() == 204 || RetCode() == 304)) {
+ return OnEndParsing(); //RFC2616 4.4-1
}
Content_.append(Data_, DataEnd_);