MCPcopy Create free account
hub / github.com/BlueAndi/Pixelix / parseChunkedResponseTrailer

Method parseChunkedResponseTrailer

lib/AsyncHttpClient/src/AsyncHttpClient.cpp:1355–1386  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1353}
1354
1355bool AsyncHttpClient::parseChunkedResponseTrailer(const char* data, size_t len, size_t& index)
1356{
1357 bool isTrailerEOF = false;
1358
1359 while ((len > index) && (false == isTrailerEOF))
1360 {
1361 size_t terminatorLen = 0U;
1362
1363 m_rspLine += data[index];
1364 ++index;
1365
1366 if (true == isEOL(m_rspLine, terminatorLen))
1367 {
1368 if (terminatorLen < m_rspLine.length())
1369 {
1370 m_rspLine.remove(m_rspLine.length() - terminatorLen);
1371
1372 LOG_DEBUG("Rsp. trailer: %s", m_rspLine.c_str());
1373 }
1374 else
1375 {
1376 LOG_DEBUG("Rsp. chunked transfer finished.");
1377
1378 isTrailerEOF = true;
1379 }
1380
1381 m_rspLine.clear();
1382 }
1383 }
1384
1385 return isTrailerEOF;
1386}
1387
1388bool AsyncHttpClient::parseChunkedResponse(const uint8_t* data, size_t len, size_t& index)
1389{

Callers

nothing calls this directly

Calls 4

removeMethod · 0.80
c_strMethod · 0.80
lengthMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected