| 718 | } |
| 719 | |
| 720 | bool 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 | |
| 742 | bool SC::HttpClientSession::hasCookie(StringSpan name, StringSpan domain, StringSpan path) const |
| 743 | { |