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

Method addAuthorization

Libraries/HttpClient/HttpClientSession.cpp:661–692  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

659 initialized = true;
660 return Result(true);
661}
662
663void SC::HttpClientSession::clear()
664{
665 clearCookies();
666 clearAuthorizations();
667 stateScratchUsed = 0;
668 headerScratchUsed = 0;
669}
670
671void SC::HttpClientSession::clearCookies()
672{
673 for (size_t idx = 0; idx < sessionMemory.cookies.sizeInElements(); ++idx)
674 {
675 sessionMemory.cookies[idx] = HttpClientSessionCookie();
676 }
677}
678
679void SC::HttpClientSession::clearAuthorizations()
680{
681 for (size_t idx = 0; idx < sessionMemory.authEntries.sizeInElements(); ++idx)
682 {
683 sessionMemory.authEntries[idx] = HttpClientSessionAuthCacheEntry();
684 }
685}
686
687const char* SC::HttpClientSessionAuthChallenge::getTargetName(Target target)
688{
689 switch (target)
690 {
691 case Origin: return "origin";
692 case Proxy: return "proxy";
693 }
694 return "unknown";
695}

Callers 1

sessionLayerMethod · 0.80

Calls 6

parseUrlFunction · 0.85
ResultClass · 0.50
isEmptyMethod · 0.45
sizeInBytesMethod · 0.45

Tested by 1

sessionLayerMethod · 0.64