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

Method findCookie

Libraries/HttpClient/HttpClientSession.cpp:720–740  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

718}
719
720bool SC::HttpClientSession::findCookie(StringSpan name, StringSpan domain, StringSpan path,
721 HttpClientSessionCookie& cookie) const
722{
723 cookie = HttpClientSessionCookie();
724 if (not initialized)
725 {
726 return false;
727 }
728
729 for (size_t idx = 0; idx < sessionMemory.cookies.sizeInElements(); ++idx)
730 {
731 const HttpClientSessionCookie& candidate = sessionMemory.cookies[idx];
732 if (candidate.isInUse() and sessionAsciiEqualsIgnoreCase(candidate.name, name) and
733 sessionAsciiEqualsIgnoreCase(candidate.domain, domain) and candidate.path == path)
734 {
735 cookie = candidate;
736 return true;
737 }
738 }
739 return false;
740}
741
742bool SC::HttpClientSession::hasCookie(StringSpan name, StringSpan domain, StringSpan path) const
743{

Callers 1

sessionLayerMethod · 0.80

Calls 1

Tested by 1

sessionLayerMethod · 0.64