Add HTTP/2 Connection Preface check test
This commit is contained in:
parent
4aae1dcc42
commit
a99e02aeb3
12
test/test.cc
12
test/test.cc
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user