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

Function hasPathUnsafeBytes

Libraries/HttpClient/HttpClient.cpp:298–310  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

296}
297
298static bool hasPathUnsafeBytes(SC::StringSpan value)
299{
300 const SC::Span<const char> bytes = value.toCharSpan();
301 for (size_t idx = 0; idx < bytes.sizeInBytes(); ++idx)
302 {
303 const unsigned char c = static_cast<unsigned char>(bytes[idx]);
304 if (c < ' ' or c == 0x7f)
305 {
306 return true;
307 }
308 }
309 return false;
310}
311
312static SC::Result validateProxyOptions(const SC::HttpClientRequestProxyOptions& proxy)
313{

Callers 1

Calls 1

sizeInBytesMethod · 0.45

Tested by

no test coverage detected