| 499 | } |
| 500 | |
| 501 | static bool cookiePathMatches(const SC::HttpClientSessionCookie& cookie, SC::StringSpan path) |
| 502 | { |
| 503 | if (cookie.path.isEmpty() or cookie.path == SC::StringSpan("/")) |
| 504 | { |
| 505 | return true; |
| 506 | } |
| 507 | if (not asciiStartsWith(path, cookie.path)) |
| 508 | { |
| 509 | return false; |
| 510 | } |
| 511 | if (path.sizeInBytes() == cookie.path.sizeInBytes() or |
| 512 | cookie.path.toCharSpan()[cookie.path.sizeInBytes() - 1] == '/') |
| 513 | { |
| 514 | return true; |
| 515 | } |
| 516 | return path.toCharSpan()[cookie.path.sizeInBytes()] == '/'; |
| 517 | } |
| 518 | |
| 519 | static bool sessionIsIdempotentMethod(SC::HttpClientRequest::Method method) |
| 520 | { |
no test coverage detected