Apply clang-format to test.cc and httplib.h

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Emre Ay
2026-07-22 10:53:51 +03:00
co-authored by Claude Opus 4.8
parent f3e9a4d887
commit 8bbfc90380
2 changed files with 4 additions and 6 deletions
+2 -1
View File
@@ -12724,7 +12724,8 @@ Server::process_request(Stream &strm, const std::string &remote_addr,
int dummy_status;
if (!detail::read_content(
strm, req, payload_max_length_, dummy_status, nullptr,
[](const char *, size_t, size_t, size_t) { return true; }, false)) {
[](const char *, size_t, size_t, size_t) { return true; },
false)) {
connection_closed = true;
}
}
+2 -5
View File
@@ -19921,8 +19921,7 @@ TEST(KeepAliveTest, UnconsumedChunkedBodyIsNotDrainedWhenResponseCloses) {
Server svr;
svr.Post("/ingest", [&](const Request &, Response &res,
const ContentReader &content_reader) {
auto consumed =
content_reader([](const char *, size_t) { return false; });
auto consumed = content_reader([](const char *, size_t) { return false; });
EXPECT_FALSE(consumed);
res.status = StatusCode::Conflict_409;
res.set_header("Connection", "close");
@@ -19959,9 +19958,7 @@ TEST(KeepAliveTest, UnconsumedChunkedBodyIsNotDrainedWhenResponseCloses) {
do {
char buf[4096];
received = recv(sock, buf, sizeof(buf), 0);
if (received > 0) {
response.append(buf, static_cast<size_t>(received));
}
if (received > 0) { response.append(buf, static_cast<size_t>(received)); }
} while (received > 0);
EXPECT_NE(std::string::npos, response.find("HTTP/1.1 409 Conflict"));