mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-10-21 11:39:48 +00:00
clang-format
This commit is contained in:
1 parent
98048a033a
commit
ded82448aa
1 file changed
+10
-11
+10
-11
@@ -11769,11 +11769,11 @@ TEST(ForwardedHeadersTest, HandlesWhitespaceAroundIPs) {
|
|||||||
svr.wait_until_ready();
|
svr.wait_until_ready();
|
||||||
|
|
||||||
std::string raw_req =
|
std::string raw_req =
|
||||||
"GET /ip HTTP/1.1\r\n"
|
"GET /ip HTTP/1.1\r\n"
|
||||||
"Host: localhost\r\n"
|
"Host: localhost\r\n"
|
||||||
"X-Forwarded-For: 198.51.100.23 , 203.0.113.66 , 192.0.2.45 \r\n"
|
"X-Forwarded-For: 198.51.100.23 , 203.0.113.66 , 192.0.2.45 \r\n"
|
||||||
"Connection: close\r\n"
|
"Connection: close\r\n"
|
||||||
"\r\n";
|
"\r\n";
|
||||||
|
|
||||||
std::string out;
|
std::string out;
|
||||||
ASSERT_TRUE(send_request(5, raw_req, &out));
|
ASSERT_TRUE(send_request(5, raw_req, &out));
|
||||||
@@ -13158,12 +13158,11 @@ TEST(ETagTest, MalformedIfNoneMatchAndWhitespace) {
|
|||||||
EXPECT_EQ(200, res_bad->status);
|
EXPECT_EQ(200, res_bad->status);
|
||||||
|
|
||||||
// Whitespace-only header value should be considered invalid / non-matching
|
// Whitespace-only header value should be considered invalid / non-matching
|
||||||
std::string raw_req =
|
std::string raw_req = "GET /static/etag_malformed.txt HTTP/1.1\r\n"
|
||||||
"GET /static/etag_malformed.txt HTTP/1.1\r\n"
|
"Host: localhost\r\n"
|
||||||
"Host: localhost\r\n"
|
"If-None-Match: \r\n"
|
||||||
"If-None-Match: \r\n"
|
"Connection: close\r\n"
|
||||||
"Connection: close\r\n"
|
"\r\n";
|
||||||
"\r\n";
|
|
||||||
|
|
||||||
std::string out;
|
std::string out;
|
||||||
ASSERT_TRUE(send_request(5, raw_req, &out));
|
ASSERT_TRUE(send_request(5, raw_req, &out));
|
||||||
|
|||||||
Reference in new issue
Block a user