1
0
mirror of synced 2025-04-28 09:25:05 +03:00

Add HTTP/2 Connection Preface check test

This commit is contained in:
yhirose 2019-10-01 06:28:02 -04:00
parent 4aae1dcc42
commit a99e02aeb3

View File

@ -1393,6 +1393,18 @@ TEST_F(ServerTest, NoMultipleHeaders) {
EXPECT_EQ(200, res->status);
}
TEST_F(ServerTest, HTTP2Magic) {
Request req;
req.method = "PRI";
req.path = "/";
req.body = "SM";
auto res = std::make_shared<Response>();
auto ret = cli_.send(req, *res);
ASSERT_TRUE(ret);
EXPECT_EQ(400, res->status);
}
TEST_F(ServerTest, KeepAlive) {
cli_.set_keep_alive_max_count(4);