MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / skipToNextBoundary

Method skipToNextBoundary

src/Server/HTTP/HTMLForm.cpp:260–283  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

258}
259
260bool HTMLForm::MultipartReadBuffer::skipToNextBoundary()
261{
262 if (in.eof())
263 return false;
264
265 chassert(boundary_hit);
266 chassert(!found_last_boundary);
267
268 boundary_hit = false;
269
270 while (!in.eof())
271 {
272 auto line = readLine(true);
273 if (startsWith(line, boundary))
274 {
275 set(in.position(), 0);
276 next(); /// We need to restrict our buffer to size of next available line.
277 found_last_boundary = startsWith(line, boundary + "--");
278 return !found_last_boundary;
279 }
280 }
281
282 return false;
283}
284
285std::string HTMLForm::MultipartReadBuffer::readLine(bool append_crlf)
286{

Callers 1

readMultipartMethod · 0.80

Calls 6

readLineFunction · 0.85
startsWithFunction · 0.50
setFunction · 0.50
nextFunction · 0.50
eofMethod · 0.45
positionMethod · 0.45

Tested by

no test coverage detected