diff options
Diffstat (limited to 'src/zenhttp/httpclient_test.cpp')
| -rw-r--r-- | src/zenhttp/httpclient_test.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/zenhttp/httpclient_test.cpp b/src/zenhttp/httpclient_test.cpp index 9b3148a4a..67cbaea9b 100644 --- a/src/zenhttp/httpclient_test.cpp +++ b/src/zenhttp/httpclient_test.cpp @@ -1148,7 +1148,7 @@ struct FaultTcpServer ~FaultTcpServer() { // io_context::stop() is thread-safe; do NOT call m_Acceptor.close() from this - // thread — ASIO I/O objects are not safe for concurrent access and the io_context + // thread - ASIO I/O objects are not safe for concurrent access and the io_context // thread may be touching the acceptor in StartAccept(). m_IoContext.stop(); if (m_Thread.joinable()) @@ -1502,7 +1502,7 @@ TEST_CASE("httpclient.transport-faults-post" * doctest::skip()) std::atomic<bool> StallActive{true}; FaultTcpServer Server([&StallActive](asio::ip::tcp::socket& Socket) { DrainHttpRequest(Socket); - // Stop reading body — TCP window will fill and client send will stall + // Stop reading body - TCP window will fill and client send will stall while (StallActive.load()) { std::this_thread::sleep_for(std::chrono::milliseconds(50)); @@ -1739,21 +1739,21 @@ TEST_CASE("httpclient.uri_decoding") TestServerFixture Fixture; HttpClient Client = Fixture.MakeClient(); - // URI without encoding — should pass through unchanged + // URI without encoding - should pass through unchanged { HttpClient::Response Resp = Client.Get("/api/test/echo/uri/hello/world.txt"); REQUIRE(Resp.IsSuccess()); CHECK(Resp.AsText() == "uri=echo/uri/hello/world.txt\ncapture=hello/world.txt"); } - // Percent-encoded space — server should see decoded path + // Percent-encoded space - server should see decoded path { HttpClient::Response Resp = Client.Get("/api/test/echo/uri/hello%20world.txt"); REQUIRE(Resp.IsSuccess()); CHECK(Resp.AsText() == "uri=echo/uri/hello world.txt\ncapture=hello world.txt"); } - // Percent-encoded slash (%2F) — should be decoded to / + // Percent-encoded slash (%2F) - should be decoded to / { HttpClient::Response Resp = Client.Get("/api/test/echo/uri/a%2Fb.txt"); REQUIRE(Resp.IsSuccess()); @@ -1767,21 +1767,21 @@ TEST_CASE("httpclient.uri_decoding") CHECK(Resp.AsText() == "uri=echo/uri/file & name.txt\ncapture=file & name.txt"); } - // No capture — echo/uri route returns just RelativeUri + // No capture - echo/uri route returns just RelativeUri { HttpClient::Response Resp = Client.Get("/api/test/echo/uri"); REQUIRE(Resp.IsSuccess()); CHECK(Resp.AsText() == "echo/uri"); } - // Literal percent that is not an escape (%ZZ) — should be kept as-is + // Literal percent that is not an escape (%ZZ) - should be kept as-is { HttpClient::Response Resp = Client.Get("/api/test/echo/uri/100%25done.txt"); REQUIRE(Resp.IsSuccess()); CHECK(Resp.AsText() == "uri=echo/uri/100%done.txt\ncapture=100%done.txt"); } - // Query params — raw values are returned as-is from GetQueryParams + // Query params - raw values are returned as-is from GetQueryParams { HttpClient::Response Resp = Client.Get("/api/test/echo/uri?key=value&name=test"); REQUIRE(Resp.IsSuccess()); @@ -1792,7 +1792,7 @@ TEST_CASE("httpclient.uri_decoding") { HttpClient::Response Resp = Client.Get("/api/test/echo/uri?prefix=listing%2F&mode=s3"); REQUIRE(Resp.IsSuccess()); - // GetQueryParams returns raw (still-encoded) values — callers must Decode() explicitly + // GetQueryParams returns raw (still-encoded) values - callers must Decode() explicitly CHECK(Resp.AsText() == "echo/uri\nprefix=listing%2F\nmode=s3"); } |