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

Method ReadLine

library/cpp/http/push_parser/http_parser.cpp:206–228  ·  view source on GitHub ↗

continue read to CurrentLine_

Source from the content-addressed store, hash-verified

204
205//continue read to CurrentLine_
206bool THttpParser::ReadLine() {
207 TStringBuf in(Data_, DataEnd_);
208 size_t endl = in.find('\n');
209
210 if (Y_UNLIKELY(endl == TStringBuf::npos)) {
211 //input line not completed
212 CurrentLine_.append(Data_, DataEnd_);
213 return false;
214 }
215
216 CurrentLine_.append(in.data(), endl);
217 if (Y_LIKELY(CurrentLine_.size())) {
218 //remove '\r' from tail
219 size_t withoutCR = CurrentLine_.size() - 1;
220 if (CurrentLine_[withoutCR] == '\r') {
221 CurrentLine_.remove(withoutCR);
222 }
223 }
224
225 //Cout << "ReadLine:" << CurrentLine_ << Endl;
226 Data_ += endl + 1;
227 return true;
228}
229
230void THttpParser::ParseHttpVersion(TStringBuf httpVersion) {
231 if (!httpVersion.StartsWith("HTTP/", 5)) {

Callers 15

BindToSocketFunction · 0.45
BindToSocketFunction · 0.45
ReadFromFeaturesMethod · 0.45
THttpHeadersMethod · 0.45
ReadFirstLineMethod · 0.45
ProceedToNextChunkMethod · 0.45
ConsumeLineMethod · 0.45
ApplyFuncTotokenizedTextFunction · 0.45
LoadMethod · 0.45
LoadMethod · 0.45
LoadMethod · 0.45
LoadMethod · 0.45

Calls 5

findMethod · 0.45
appendMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected