mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-10-12 10:22:39 +00:00
Fix the RFC reference in the Host validation test
The rule that a client sends an empty Host value when the target URI has no authority is in RFC 9112 §3.2, not RFC 9110 §7.2.
This commit is contained in:
+1
-1
@@ -19716,7 +19716,7 @@ TEST(HostHeaderValidationTest, AmbiguousOrInvalidHostRejected) {
|
||||
"Host: my_service\r\n",
|
||||
"Host: [::1]:8080\r\n",
|
||||
"Host: [fe80::1%25eth0]\r\n",
|
||||
"Host: \r\n", // RFC 9110 §7.2: the target URI has no authority
|
||||
"Host: \r\n", // RFC 9112 §3.2: the target URI has no authority
|
||||
};
|
||||
for (auto host_lines : accepted) {
|
||||
EXPECT_EQ("HTTP/1.1 200 OK", status_line(host_lines)) << host_lines;
|
||||
|
||||
Reference in New Issue
Block a user