| 481 | parsed.host = sliceString(url, hostnameStart, hostnameEnd); |
| 482 | |
| 483 | if (hostEnd < bytes.sizeInBytes() and bytes[hostEnd] == '/') |
| 484 | { |
| 485 | size_t pathEnd = hostEnd; |
| 486 | while (pathEnd < bytes.sizeInBytes() and bytes[pathEnd] != '?' and bytes[pathEnd] != '#') |
| 487 | { |
| 488 | pathEnd += 1; |
| 489 | } |
| 490 | parsed.path = sliceString(url, hostEnd, pathEnd); |
| 491 | } |
| 492 | else |
| 493 | { |
| 494 | parsed.path = SC::StringSpan("/"); |
| 495 | } |
| 496 | return true; |
| 497 | } |
| 498 | |
| 499 | static bool isCookieIpHost(SC::StringSpan host) |
| 500 | { |
| 501 | const SC::Span<const char> bytes = host.toCharSpan(); |
| 502 | if (bytes.sizeInBytes() >= 2 and bytes[0] == '[' and bytes[bytes.sizeInBytes() - 1] == ']') |
no test coverage detected