MCPcopy Create free account
hub / github.com/catboost/catboost / ContentParser

Method ContentParser

library/cpp/http/push_parser/http_parser.cpp:118–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116}
117
118bool THttpParser::ContentParser() {
119 DBGOUT("Content parsing()");
120 if (HasContentLength_ && !BodyNotExpected_) {
121 size_t rd = Min<size_t>(DataEnd_ - Data_, ContentLength_ - Content_.size());
122 Content_.append(Data_, rd);
123 Data_ += rd;
124 DBGOUT("Content parsing: " << Content_.Size() << " from " << ContentLength_);
125 if (Content_.size() == ContentLength_) {
126 return OnEndParsing();
127 }
128 } else {
129 if (MessageType_ == Request) {
130 return OnEndParsing(); //RFC2616 4.4-5
131 } else if (Y_UNLIKELY(BodyNotExpected_)) {
132 return OnEndParsing(); //RFC2616 4.4-1
133 }
134
135 Content_.append(Data_, DataEnd_);
136 Data_ = DataEnd_;
137 }
138 Parser_ = &THttpParser::ContentParser;
139 return false;
140}
141
142bool THttpParser::ChunkedContentParser() {
143 if (BodyNotExpected_) {

Callers

nothing calls this directly

Calls 3

sizeMethod · 0.45
appendMethod · 0.45
SizeMethod · 0.45

Tested by

no test coverage detected