Fix code inconsistently formatted and re-format (#2063)

* Fix code inconsistently formatted by clang-format

* Run clang-format
This commit is contained in:
Florian Albrechtskirchinger 2025-02-17 18:14:02 +01:00 committed by GitHub
parent 32bf5c9c09
commit 2996cecee0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 31 additions and 33 deletions

View file

@ -3553,9 +3553,11 @@ TEST_F(ServerTest, TooLongRequest) {
}
TEST_F(ServerTest, AlmostTooLongRequest) {
// test for #2046 - URI length check shouldn't include other content on req line
// URI is max URI length, minus 14 other chars in req line (GET, space, leading /, space, HTTP/1.1)
std::string request = "/" + string(CPPHTTPLIB_REQUEST_URI_MAX_LENGTH - 14, 'A');
// test for #2046 - URI length check shouldn't include other content on req
// line URI is max URI length, minus 14 other chars in req line (GET, space,
// leading /, space, HTTP/1.1)
std::string request =
"/" + string(CPPHTTPLIB_REQUEST_URI_MAX_LENGTH - 14, 'A');
auto res = cli_.Get(request.c_str());
@ -8283,7 +8285,6 @@ TEST(MaxTimeoutTest, ContentStream) {
Client cli("localhost", PORT);
cli.set_max_timeout(std::chrono::milliseconds(timeout));
{
auto start = std::chrono::steady_clock::now();
@ -8345,7 +8346,7 @@ TEST(MaxTimeoutTest, ContentStreamSSL) {
[&, data](size_t offset, size_t length, DataSink &sink) {
const size_t DATA_CHUNK_SIZE = 4;
const auto &d = *data;
std::this_thread::sleep_for(std::chrono::seconds(1));
std::this_thread::sleep_for(std::chrono::seconds(1));
sink.write(&d[offset], std::min(length, DATA_CHUNK_SIZE));
return true;
},