Compare commits

..
Author SHA1 Message Date
yhirose 1f59c57662 Release v0.70.0 2026-12-05 11:50:35 -06:00
yhirose d81a932f2a Bound what one stream read inflates when there is no payload limit
With a zero payload limit, StreamHandle::read_with_decompression() held
everything a compressed read inflated to in memory with no bound, and
SSEClient always reads its stream with a zero limit. Keep a single read
within the default payload limit, while the stream as a whole stays
unbounded.
2026-12-05 11:28:46 -06:00
6 changed files with 138 additions and 129 deletions

No files matched your search

+2 -12
View File
@@ -4,7 +4,7 @@
# #
# Usage: ./ab.sh [--base REF] [--head REF] [--rounds N] [--duration S] # Usage: ./ab.sh [--base REF] [--head REF] [--rounds N] [--duration S]
# [--connections N] [--threads N] [--path PATH] [--tls] # [--connections N] [--threads N] [--path PATH] [--tls]
# [--large-mib N] [--timeout S] [--no-keep-alive] # [--large-mib N] [--timeout S]
# #
# --path selects the workload. The harness serves: # --path selects the workload. The harness serves:
# / small body via set_content(); the response line, the # / small body via set_content(); the response line, the
@@ -20,9 +20,6 @@
# --tls runs the same workload over HTTPS, which writes through # --tls runs the same workload over HTTPS, which writes through
# SSLSocketStream instead of SocketStream. # SSLSocketStream instead of SocketStream.
# #
# --no-keep-alive opens a new connection for every request, which measures
# the cost of accepting and setting up a connection.
#
# --timeout is bombardier's per-request timeout. Its 2s default aborts large # --timeout is bombardier's per-request timeout. Its 2s default aborts large
# TLS responses, and the run then fails on the non-2xx check. # TLS responses, and the run then fails on the non-2xx check.
# #
@@ -46,7 +43,6 @@ REQ_PATH="/"
TLS=0 TLS=0
LARGE_MIB=1 LARGE_MIB=1
TIMEOUT="30s" TIMEOUT="30s"
NO_KEEP_ALIVE=0
while [ $# -gt 0 ]; do while [ $# -gt 0 ]; do
case "$1" in case "$1" in
@@ -60,16 +56,10 @@ while [ $# -gt 0 ]; do
--large-mib) LARGE_MIB="$2"; shift 2 ;; --large-mib) LARGE_MIB="$2"; shift 2 ;;
--timeout) TIMEOUT="$2"; shift 2 ;; --timeout) TIMEOUT="$2"; shift 2 ;;
--tls) TLS=1; shift ;; --tls) TLS=1; shift ;;
--no-keep-alive) NO_KEEP_ALIVE=1; shift ;;
*) echo "Unknown option: $1" >&2; exit 1 ;; *) echo "Unknown option: $1" >&2; exit 1 ;;
esac esac
done done
# bombardier's default fasthttp client ignores -a, so close each connection
# with the request header instead.
CLOSE_HEADER=()
if [ "$NO_KEEP_ALIVE" -eq 1 ]; then CLOSE_HEADER=(-H "Connection: close"); fi
command -v bombardier >/dev/null || { echo "Error: bombardier not found" >&2; exit 1; } command -v bombardier >/dev/null || { echo "Error: bombardier not found" >&2; exit 1; }
command -v python3 >/dev/null || { echo "Error: python3 not found" >&2; exit 1; } command -v python3 >/dev/null || { echo "Error: python3 not found" >&2; exit 1; }
@@ -172,7 +162,7 @@ measure() {
done done
set +e set +e
json=$(bombardier -c "$CONNECTIONS" -d "$DURATION" -t "$TIMEOUT" -o json -p r $INSECURE ${CLOSE_HEADER[@]+"${CLOSE_HEADER[@]}"} \ json=$(bombardier -c "$CONNECTIONS" -d "$DURATION" -t "$TIMEOUT" -o json -p r $INSECURE \
"$SCHEME://127.0.0.1:$PORT$REQ_PATH" 2>/dev/null) "$SCHEME://127.0.0.1:$PORT$REQ_PATH" 2>/dev/null)
rc=$? rc=$?
set -e set -e
+1 -1
View File
@@ -4,7 +4,7 @@ langs = ["en", "ja"]
[site] [site]
title = "cpp-httplib" title = "cpp-httplib"
version = "0.69.0" version = "0.70.0"
hostname = "https://yhirose.github.io" hostname = "https://yhirose.github.io"
base_path = "/cpp-httplib" base_path = "/cpp-httplib"
footer_message = "© 2026 Yuji Hirose. All rights reserved." footer_message = "© 2026 Yuji Hirose. All rights reserved."
+89 -29
View File
@@ -8,8 +8,8 @@
#ifndef CPPHTTPLIB_HTTPLIB_H #ifndef CPPHTTPLIB_HTTPLIB_H
#define CPPHTTPLIB_HTTPLIB_H #define CPPHTTPLIB_HTTPLIB_H
#define CPPHTTPLIB_VERSION "0.69.0" #define CPPHTTPLIB_VERSION "0.70.0"
#define CPPHTTPLIB_VERSION_NUM "0x004500" #define CPPHTTPLIB_VERSION_NUM "0x004600"
#ifdef _WIN32 #ifdef _WIN32
#if defined(_WIN32_WINNT) && _WIN32_WINNT < 0x0A00 #if defined(_WIN32_WINNT) && _WIN32_WINNT < 0x0A00
@@ -2611,7 +2611,7 @@ private:
ContentReceiver multipart_receiver) const; ContentReceiver multipart_receiver) const;
virtual bool process_and_close_socket(socket_t sock); virtual bool process_and_close_socket(socket_t sock);
// The connection that serves an accepted socket, with or without parking. // The connection that parking_loop() keeps for a socket it has accepted.
virtual std::shared_ptr<KeepAliveConnection> virtual std::shared_ptr<KeepAliveConnection>
new_keep_alive_connection(socket_t sock); new_keep_alive_connection(socket_t sock);
@@ -3574,6 +3574,7 @@ public:
int ssl_last_error() const { return last_ssl_error_; } int ssl_last_error() const { return last_ssl_error_; }
private: private:
bool process_and_close_socket(socket_t sock) override;
std::shared_ptr<KeepAliveConnection> std::shared_ptr<KeepAliveConnection>
new_keep_alive_connection(socket_t sock) override; new_keep_alive_connection(socket_t sock) override;
struct TlsConnection; struct TlsConnection;
@@ -14485,9 +14486,9 @@ WebSocketSSLStream::set_read_interrupt(std::function<bool()> interrupted) {
* Group 4: Server implementation * Group 4: Server implementation
*/ */
// A connection served across its requests. With set_keep_alive_parking(), the // A kept-alive connection that the event loop of set_keep_alive_parking()
// event loop owns it while it is idle, and a worker while it serves a request. // owns while it is idle, and a worker owns while it serves a request. A
// A derived class adds the transport: the stream, and for TLS the session. // derived class adds the transport: the stream, and for TLS the session.
struct Server::KeepAliveConnection { struct Server::KeepAliveConnection {
KeepAliveConnection(socket_t s, Server &server) : svr(server), sock(s) {} KeepAliveConnection(socket_t s, Server &server) : svr(server), sock(s) {}
// Every owner closes it before letting go, which the transport hooks need; // Every owner closes it before letting go, which the transport hooks need;
@@ -14507,8 +14508,8 @@ struct Server::KeepAliveConnection {
// close_notify. // close_notify.
virtual void shut_down(bool /*graceful*/) {} virtual void shut_down(bool /*graceful*/) {}
// On a worker, with parking once the event loop has seen the socket // On a worker, once the event loop has seen the socket readable. Afterwards
// readable. Afterwards turn.park tells whether it may be parked again. // turn.park tells whether it may be parked again.
bool resume() { bool resume() {
turn = Turn(); turn = Turn();
return svr.serve_guarded([this]() { return svr.serve_guarded([this]() {
@@ -14533,11 +14534,11 @@ struct Server::KeepAliveConnection {
sock = INVALID_SOCKET; sock = INVALID_SOCKET;
} }
// From the worker that served it, with what resume() returned. // From the worker that served it.
void close_served(bool ok) { void close_served(bool graceful) {
assert(sock != INVALID_SOCKET); assert(sock != INVALID_SOCKET);
if (opened) { if (opened) {
shut_down(ok && !turn.websocket_upgraded); shut_down(graceful);
detail::drain_and_close_socket(sock); detail::drain_and_close_socket(sock);
} else { } else {
// It never got as far as a request, e.g. a failed TLS handshake. // It never got as far as a request, e.g. a failed TLS handshake.
@@ -14562,10 +14563,6 @@ struct Server::KeepAliveConnection {
} }
bool wait_for_next_request() { bool wait_for_next_request() {
if (wait_in_place) {
return detail::keep_alive(svr.svr_sock_, sock,
svr.keep_alive_timeout_sec_);
}
// The event loop saw the socket readable just before this ran. // The event loop saw the socket readable just before this ran.
if (turn.woken) { if (turn.woken) {
turn.woken = false; turn.woken = false;
@@ -14589,8 +14586,6 @@ struct Server::KeepAliveConnection {
int remote_port = 0; int remote_port = 0;
int local_port = 0; int local_port = 0;
bool opened = false; // by resume(), once open() has succeeded bool opened = false; // by resume(), once open() has succeeded
// Waits for the next request on the worker, as without parking.
bool wait_in_place = false;
Turn turn; Turn turn;
size_t served = 0; size_t served = 0;
std::string remote_addr; std::string remote_addr;
@@ -16649,10 +16644,29 @@ Server::process_request(Stream &strm, const std::string &remote_addr,
inline bool Server::is_valid() const { return !has_invalid_registration_; } inline bool Server::is_valid() const { return !has_invalid_registration_; }
inline bool Server::process_and_close_socket(socket_t sock) { inline bool Server::process_and_close_socket(socket_t sock) {
auto conn = new_keep_alive_connection(sock); std::string remote_addr;
conn->wait_in_place = true; int remote_port = 0;
auto ret = conn->resume(); detail::get_remote_ip_and_port(sock, remote_addr, remote_port);
conn->close_served(ret);
std::string local_addr;
int local_port = 0;
detail::get_local_ip_and_port(sock, local_addr, local_port);
bool websocket_upgraded = false;
auto ret = serve_guarded([&]() {
return detail::process_server_socket(
svr_sock_, sock, keep_alive_max_count_, keep_alive_timeout_sec_,
read_timeout_sec_, read_timeout_usec_, write_timeout_sec_,
write_timeout_usec_,
[&](Stream &strm, bool close_connection, bool &connection_closed) {
return process_request(strm, remote_addr, remote_port, local_addr,
local_port, close_connection,
connection_closed, nullptr,
&websocket_upgraded);
});
});
detail::drain_and_close_socket(sock);
return ret; return ret;
} }
@@ -16837,7 +16851,7 @@ Server::resume_connection(std::shared_ptr<KeepAliveConnection> conn) {
c.release_buffers(); // it may stay idle for long c.release_buffers(); // it may stay idle for long
if (st.give_back(conn)) { return; } if (st.give_back(conn)) { return; }
} }
c.close_served(ret); c.close_served(!c.turn.websocket_upgraded && ret);
} }
inline void Server::output_log(const Request &req, const Response &res) const { inline void Server::output_log(const Request &req, const Response &res) const {
@@ -17449,6 +17463,14 @@ inline ssize_t ClientImpl::StreamHandle::read_with_decompression(char *buf,
constexpr size_t kDecompressionBufferSize = 8192; constexpr size_t kDecompressionBufferSize = 8192;
char compressed_buf[kDecompressionBufferSize]; char compressed_buf[kDecompressionBufferSize];
auto limit = body_reader_.payload_max_length;
auto counted = decompressed_bytes_read_;
if (limit == 0) {
// The stream is unbounded, but one read holds all it inflates at once
limit = CPPHTTPLIB_PAYLOAD_MAX_LENGTH;
counted = 0;
}
while (true) { while (true) {
auto n = detail::read_body_content(stream_, body_reader_, compressed_buf, auto n = detail::read_body_content(stream_, body_reader_, compressed_buf,
sizeof(compressed_buf)); sizeof(compressed_buf));
@@ -17460,10 +17482,7 @@ inline ssize_t ClientImpl::StreamHandle::read_with_decompression(char *buf,
compressed_buf, static_cast<size_t>(n), compressed_buf, static_cast<size_t>(n),
[&](const char *data, size_t data_len) { [&](const char *data, size_t data_len) {
decompress_buffer_.append(data, data_len); decompress_buffer_.append(data, data_len);
auto limit = body_reader_.payload_max_length; exceeded = limit > 0 && counted + decompress_buffer_.size() > limit;
exceeded =
limit > 0 &&
decompressed_bytes_read_ + decompress_buffer_.size() > limit;
return !exceeded; return !exceeded;
}); });
@@ -20376,9 +20395,9 @@ inline bool ssl_free_buffers_is_safe(unsigned long version) {
} // namespace detail } // namespace detail
#endif #endif
// The connection of SSLServer. The worker that first resumes it runs the // A connection that keep-alive parking keeps for SSLServer. The worker that
// handshake, so with parking one that has not sent its ClientHello yet waits // first resumes it runs the handshake, so one that has not sent its
// in the event loop like an idle connection. // ClientHello yet waits in the event loop like an idle connection.
struct SSLServer::TlsConnection final : Server::KeepAliveConnection { struct SSLServer::TlsConnection final : Server::KeepAliveConnection {
TlsConnection(socket_t s, SSLServer &server) TlsConnection(socket_t s, SSLServer &server)
: KeepAliveConnection(s, server), ssl_svr(server) {} : KeepAliveConnection(s, server), ssl_svr(server) {}
@@ -20476,6 +20495,47 @@ inline tls::session_t SSLServer::start_session(socket_t sock) {
return session; return session;
} }
inline bool SSLServer::process_and_close_socket(socket_t sock) {
auto session = start_session(sock);
if (!session) {
detail::shutdown_socket(sock);
detail::close_socket(sock);
return false;
}
// Use scope_exit to ensure cleanup on all paths (including exceptions)
bool ret = false;
bool websocket_upgraded = false;
auto cleanup = detail::scope_exit([&] {
tls::shutdown(session, !websocket_upgraded && ret);
tls::free_session(session);
detail::drain_and_close_socket(sock);
});
std::string remote_addr;
int remote_port = 0;
detail::get_remote_ip_and_port(sock, remote_addr, remote_port);
std::string local_addr;
int local_port = 0;
detail::get_local_ip_and_port(sock, local_addr, local_port);
ret = serve_guarded([&]() {
return detail::process_server_socket_ssl(
svr_sock_, session, sock, keep_alive_max_count_,
keep_alive_timeout_sec_, read_timeout_sec_, read_timeout_usec_,
write_timeout_sec_, write_timeout_usec_,
[&](Stream &strm, bool close_connection, bool &connection_closed) {
return process_request(
strm, remote_addr, remote_port, local_addr, local_port,
close_connection, connection_closed,
[&](Request &req) { req.ssl = session; }, &websocket_upgraded);
});
});
return ret;
}
inline bool SSLServer::update_certs_pem(const char *cert_pem, inline bool SSLServer::update_certs_pem(const char *cert_pem,
const char *key_pem, const char *key_pem,
const char *client_ca_pem, const char *client_ca_pem,
+1 -5
View File
@@ -26,11 +26,7 @@ endif()
find_package(CURL REQUIRED) find_package(CURL REQUIRED)
# include_httplib.cc checks the header-only build, as the Makefile's split add_executable(httplib-test test.cc include_httplib.cc $<$<BOOL:${WIN32}>:include_windows_h.cc>)
# targets leave it out too.
add_executable(httplib-test test.cc
$<$<NOT:$<BOOL:${HTTPLIB_IS_COMPILED}>>:include_httplib.cc>
$<$<BOOL:${WIN32}>:include_windows_h.cc>)
target_compile_options(httplib-test PRIVATE "$<$<CXX_COMPILER_ID:MSVC>:/utf-8;/bigobj>") target_compile_options(httplib-test PRIVATE "$<$<CXX_COMPILER_ID:MSVC>:/utf-8;/bigobj>")
target_link_libraries(httplib-test PRIVATE httplib GTest::gtest_main CURL::libcurl) target_link_libraries(httplib-test PRIVATE httplib GTest::gtest_main CURL::libcurl)
gtest_discover_tests(httplib-test) gtest_discover_tests(httplib-test)
+3 -16
View File
@@ -1,18 +1,5 @@
// Includes httplib.h in a separate compilation unit, thus verifying that // The sole purpose of this file is to include httplib.h in a separate
// inline keywords have not been forgotten when linked together with test.cc. // compilation unit, thus verifying that inline keywords have not been forgotten
// when linked together with test.cc.
#include <httplib.h> #include <httplib.h>
// Nothing in the library calls these, but subclasses that override
// process_and_close_socket() do. Instantiating them here, where the split build
// does not reach, keeps a change to process_server_socket_core() from breaking
// them unnoticed.
struct IncludeHttplibServeNothing {
bool operator()(httplib::Stream &, bool, bool &) const { return false; }
};
auto include_httplib_process_server_socket =
&httplib::detail::process_server_socket<IncludeHttplibServeNothing>;
#ifdef CPPHTTPLIB_SSL_ENABLED
auto include_httplib_process_server_socket_ssl =
&httplib::detail::process_server_socket_ssl<IncludeHttplibServeNothing>;
#endif
+42 -66
View File
@@ -6571,8 +6571,8 @@ TEST(ServerExceptionTest, ThrowingWebSocketHandlerDoesNotKillTheServer) {
#ifdef CPPHTTPLIB_SSL_ENABLED #ifdef CPPHTTPLIB_SSL_ENABLED
TEST(ServerExceptionTest, ThrowingContentProviderDoesNotKillTheSSLServer) { TEST(ServerExceptionTest, ThrowingContentProviderDoesNotKillTheSSLServer) {
// SSLServer serves through its own connection type, so it is exercised on // SSLServer::process_and_close_socket() is a separate overload with its own
// its own. // guard, so it is exercised on its own.
SSLServer svr(SERVER_CERT_FILE, SERVER_PRIVATE_KEY_FILE); SSLServer svr(SERVER_CERT_FILE, SERVER_PRIVATE_KEY_FILE);
ASSERT_TRUE(svr.is_valid()); ASSERT_TRUE(svr.is_valid());
svr.new_task_queue = [] { return new ThreadPool(1); }; svr.new_task_queue = [] { return new ThreadPool(1); };
@@ -16978,6 +16978,43 @@ TEST(ClientVulnerabilityTest, ZipBombWithoutContentLength) {
} }
#endif #endif
#ifdef CPPHTTPLIB_BROTLI_SUPPORT
// A zero limit leaves a stream unbounded, but a body of a few bytes must not
// inflate past the default limit in a single read
TEST(ClientVulnerabilityTest, BrotliBombInStreamWithoutPayloadLimit) {
std::string bomb(1024, '\0');
{
std::string body(CPPHTTPLIB_PAYLOAD_MAX_LENGTH + 1024 * 1024, 'A');
auto size = bomb.size();
ASSERT_TRUE(BrotliEncoderCompress(
5, BROTLI_DEFAULT_WINDOW, BROTLI_MODE_GENERIC, body.size(),
reinterpret_cast<const uint8_t *>(body.data()), &size,
reinterpret_cast<uint8_t *>(&bomb[0])));
bomb.resize(size);
}
Server svr;
svr.Get("/", [&](const Request &, Response &res) {
res.set_header("Content-Encoding", "br");
res.set_content(bomb, "text/plain");
});
auto port = svr.bind_to_any_port(HOST);
std::thread t([&] { svr.listen_after_bind(); });
auto se = detail::scope_exit([&] {
svr.stop();
t.join();
});
svr.wait_until_ready();
Client cli(HOST, port);
cli.set_payload_max_length(0);
auto result = stream::Get(cli, "/");
ASSERT_TRUE(result.is_valid());
while (result.next()) {}
EXPECT_EQ(Error::ExceedMaxPayloadSize, result.read_error());
}
#endif
TEST(HostAndPortPropertiesTest, NoSSL) { TEST(HostAndPortPropertiesTest, NoSSL) {
httplib::Client cli("www.google.com", 1234); httplib::Client cli("www.google.com", 1234);
ASSERT_EQ("www.google.com", cli.host()); ASSERT_EQ("www.google.com", cli.host());
@@ -34997,10 +35034,9 @@ bool wait_until(const std::function<bool()> &cond, int timeout_ms) {
return true; return true;
} }
void serve_ok(Server &svr, std::function<TaskQueue *(void)> new_task_queue, void serve_ok(Server &svr, std::function<TaskQueue *(void)> new_task_queue) {
bool parking = true) {
svr.new_task_queue = std::move(new_task_queue); svr.new_task_queue = std::move(new_task_queue);
svr.set_keep_alive_parking(parking); svr.set_keep_alive_parking(true);
svr.Get("/", [](const Request &, Response &res) { svr.Get("/", [](const Request &, Response &res) {
res.set_content("ok", "text/plain"); res.set_content("ok", "text/plain");
}); });
@@ -35064,63 +35100,6 @@ private:
} // namespace parking_test } // namespace parking_test
// A connection that sends nothing is closed at the keep-alive timeout, not the
// read timeout, whether or not it is parked.
TEST(KeepAliveParkingTest, FirstRequestWaitsForTheKeepAliveTimeout) {
using namespace parking_test;
// Both modes at once, since each waits a whole second.
Server svrs[2];
std::unique_ptr<RunningServer> running[2];
Sockets socks; // after `running`, so that the sockets close first
for (auto i = 0; i < 2; i++) {
serve_ok(svrs[i], threads(1), /*parking=*/i == 0);
svrs[i].set_read_timeout(10, 0);
svrs[i].set_keep_alive_timeout(1);
running[i].reset(new RunningServer(svrs[i]));
ASSERT_NE(INVALID_SOCKET, socks.connect(running[i]->port));
}
auto early = in_ms(500);
for (size_t i = 0; i < 2; i++) {
SCOPED_TRACE(i == 0 ? "parking" : "no parking");
EXPECT_FALSE(sees_eof(socks.socks[i], early));
}
auto late = in_ms(2500);
for (size_t i = 0; i < 2; i++) {
SCOPED_TRACE(i == 0 ? "parking" : "no parking");
EXPECT_TRUE(sees_eof(socks.socks[i], late));
}
}
// Without parking, a request that arrived before stop() is still served when
// its worker gets to it.
TEST(KeepAliveParkingTest, RequestBeforeStopIsServedWithoutParking) {
using namespace parking_test;
std::atomic<int> ok{0}, full{0};
Server svr;
serve_ok(svr, [&] { return new CountingTaskQueue(1, 0, ok, full); }, false);
Gate gate;
svr.Get("/gate", [&](const Request &, Response &res) {
gate.wait();
res.set_content("ok", "text/plain");
});
RunningServer running(svr);
Sockets socks;
// Hold the only worker, and queue a connection whose request has arrived.
auto held = socks.connect(running.port);
ASSERT_TRUE(send_get(held, "/gate"));
ASSERT_TRUE(wait_until([&] { return gate.entered() == 1; }, 2000));
auto waiting = socks.connect(running.port);
ASSERT_TRUE(send_get(waiting));
ASSERT_TRUE(wait_until([&] { return ok == 2; }, 2000));
svr.stop();
gate.open();
EXPECT_TRUE(receives_ok(held, 2000));
EXPECT_TRUE(receives_ok(waiting, 2000));
}
TEST(KeepAliveParkingTest, IdleConnectionsDoNotHoldTheWorkers) { TEST(KeepAliveParkingTest, IdleConnectionsDoNotHoldTheWorkers) {
using namespace parking_test; using namespace parking_test;
Server svr; Server svr;
@@ -35375,11 +35354,9 @@ TEST(KeepAliveParkingTest, IdleTlsConnectionsDoNotHoldTheWorkers) {
TEST(KeepAliveParkingTest, FailedTlsHandshakeClosesTheConnection) { TEST(KeepAliveParkingTest, FailedTlsHandshakeClosesTheConnection) {
using namespace parking_test; using namespace parking_test;
for (auto parking : {true, false}) {
SCOPED_TRACE(parking ? "parking" : "no parking");
SSLServer svr(SERVER_CERT_FILE, SERVER_PRIVATE_KEY_FILE); SSLServer svr(SERVER_CERT_FILE, SERVER_PRIVATE_KEY_FILE);
ASSERT_TRUE(svr.is_valid()); ASSERT_TRUE(svr.is_valid());
serve_ok(svr, threads(1), parking); serve_ok(svr, threads(1));
RunningServer running(svr); RunningServer running(svr);
Sockets socks; Sockets socks;
@@ -35387,7 +35364,6 @@ TEST(KeepAliveParkingTest, FailedTlsHandshakeClosesTheConnection) {
ASSERT_TRUE(send_get(plain)); ASSERT_TRUE(send_get(plain));
EXPECT_TRUE(sees_eof(plain, in_ms(1000))); EXPECT_TRUE(sees_eof(plain, in_ms(1000)));
EXPECT_NE(0, svr.ssl_last_error()); EXPECT_NE(0, svr.ssl_last_error());
}
} }
TEST(KeepAliveParkingTest, StopClosesParkedTlsConnections) { TEST(KeepAliveParkingTest, StopClosesParkedTlsConnections) {