Add multiple content length error

fix #2468
This commit is contained in:
alandefreitas
2022-10-02 20:04:46 +08:00
committed by Klemens Morgenstern
parent b4e0f0d560
commit 5866e50438
6 changed files with 13 additions and 3 deletions
+1 -1
View File
@@ -703,7 +703,7 @@ public:
failgrind<P>(c(",\r\n"), error::bad_content_length);
failgrind<P>(c("0,\r\n"), error::bad_content_length);
failgrind<P>(m("Content-Length: 0\r\n"
"Content-Length: 100\r\n"), error::bad_content_length);
"Content-Length: 100\r\n"), error::multiple_content_length);
}
void
+1
View File
@@ -65,6 +65,7 @@ public:
check("beast.http", error::bad_chunk);
check("beast.http", error::bad_chunk_extension);
check("beast.http", error::bad_obs_fold);
check("beast.http", error::multiple_content_length);
check("beast.http", error::stale_parser);
check("beast.http", error::short_read);
+1 -1
View File
@@ -378,7 +378,7 @@ public:
response_parser<string_body> parser;
error_code ec;
parser.put(net::buffer(message), ec);
BEAST_EXPECTS(ec == error::bad_content_length, ec.message());
BEAST_EXPECTS(ec == error::multiple_content_length, ec.message());
};
// multiple contents lengths the same