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

Method isEOL

lib/AsyncHttpClient/src/AsyncHttpClient.cpp:1181–1209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1179}
1180
1181bool AsyncHttpClient::isEOL(const String& str, size_t& len)
1182{
1183 bool isEOL = false;
1184 const char TERMINATOR_LF[] = "\n";
1185 const char TERMINATOR_CRLF[] = "\r\n";
1186
1187 len = 0U;
1188
1189 /* RFC7230 - 3.5. Message Parsing Robustness
1190 * Although the line terminator for the start-line and header fields is
1191 * the sequence CRLF, a recipient MAY recognize a single LF as a line
1192 * terminator and ignore any preceding CR.
1193 */
1194 if (0U != str.endsWith(TERMINATOR_LF))
1195 {
1196 isEOL = true;
1197
1198 if (0U != str.endsWith(TERMINATOR_CRLF))
1199 {
1200 len = 2U;
1201 }
1202 else
1203 {
1204 len = 1U;
1205 }
1206 }
1207
1208 return isEOL;
1209}
1210
1211bool AsyncHttpClient::handleRspHeader()
1212{

Callers

nothing calls this directly

Calls 1

endsWithMethod · 0.80

Tested by

no test coverage detected