| 640 | { |
| 641 | if (index < username.sizeInBytes()) |
| 642 | { |
| 643 | return username[index]; |
| 644 | } |
| 645 | if (index == username.sizeInBytes()) |
| 646 | { |
| 647 | return ':'; |
| 648 | } |
| 649 | return password[index - username.sizeInBytes() - 1]; |
| 650 | } |
| 651 | } // namespace |
| 652 | |
| 653 | SC::Result SC::HttpClientSession::init(const HttpClientSessionMemory& memory) |
| 654 | { |
| 655 | SC_TRY_MSG(not initialized, "HttpClientSession: already initialized"); |
| 656 | SC_TRY_MSG(not memory.requestHeaders.empty(), "HttpClientSession: request header workspace missing"); |
| 657 | sessionMemory = memory; |
| 658 | clear(); |
| 659 | initialized = true; |
| 660 | return Result(true); |
| 661 | } |
| 662 |
nothing calls this directly
no test coverage detected