MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / hasHttpHeaderUnsafeBytes

Function hasHttpHeaderUnsafeBytes

Libraries/HttpClient/HttpClient.cpp:271–282  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

269}
270
271static bool hasHttpHeaderUnsafeBytes(SC::StringSpan value)
272{
273 const SC::Span<const char> bytes = value.toCharSpan();
274 for (size_t idx = 0; idx < bytes.sizeInBytes(); ++idx)
275 {
276 if (bytes[idx] == '\r' or bytes[idx] == '\n' or bytes[idx] == '\0')
277 {
278 return true;
279 }
280 }
281 return false;
282}
283
284static bool hasUrlUnsafeBytes(SC::StringSpan value)
285{

Callers 1

validateProxyOptionsFunction · 0.85

Calls 1

sizeInBytesMethod · 0.45

Tested by

no test coverage detected