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

Method parseChunkedResponseSize

lib/AsyncHttpClient/src/AsyncHttpClient.cpp:1269–1293  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1267}
1268
1269bool AsyncHttpClient::parseChunkedResponseSize(const char* data, size_t len, size_t& index)
1270{
1271 bool isSizeEOF = false;
1272
1273 while ((len > index) && (false == isSizeEOF))
1274 {
1275 size_t terminatorLen = 0U;
1276
1277 m_rspLine += data[index];
1278 ++index;
1279
1280 if (true == isEOL(m_rspLine, terminatorLen))
1281 {
1282 m_rspLine.remove(m_rspLine.length() - terminatorLen);
1283 m_chunkSize = Util::hexToUInt32(m_rspLine);
1284
1285 LOG_INFO("Chunk size is %u byte.", m_chunkSize);
1286
1287 m_rspLine.clear();
1288 isSizeEOF = true;
1289 }
1290 }
1291
1292 return isSizeEOF;
1293}
1294
1295bool AsyncHttpClient::parseChunkedResponseChunkData(const uint8_t* data, size_t len, size_t& index)
1296{

Callers

nothing calls this directly

Calls 3

removeMethod · 0.80
lengthMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected