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

Function hasUrlUnsafeBytes

Libraries/HttpClient/HttpClient.cpp:284–296  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

282}
283
284static bool hasUrlUnsafeBytes(SC::StringSpan value)
285{
286 const SC::Span<const char> bytes = value.toCharSpan();
287 for (size_t idx = 0; idx < bytes.sizeInBytes(); ++idx)
288 {
289 const unsigned char c = static_cast<unsigned char>(bytes[idx]);
290 if (c <= ' ' or c == 0x7f)
291 {
292 return true;
293 }
294 }
295 return false;
296}
297
298static bool hasPathUnsafeBytes(SC::StringSpan value)
299{

Callers 2

validateProxyOptionsFunction · 0.85
validateRequestUrlFunction · 0.85

Calls 1

sizeInBytesMethod · 0.45

Tested by

no test coverage detected