forked from boostorg/beast
Empty header values are allowed & documented.
This commit is contained in:
committed by
Klemens Morgenstern
parent
541a6bf453
commit
01dd53d665
@@ -1072,6 +1072,20 @@ public:
|
||||
BOOST_STATIC_ASSERT(( insert_test<string_view, const char(&)[10]>::value));
|
||||
}
|
||||
|
||||
void
|
||||
testEmpty()
|
||||
{
|
||||
beast::http::fields req;
|
||||
req.insert("abc", "");
|
||||
req.set("cba", "");
|
||||
auto itr = req.find("abc");
|
||||
BEAST_EXPECT(itr != req.end());
|
||||
BEAST_EXPECT(itr->value().empty());
|
||||
itr = req.find("cba");
|
||||
BEAST_EXPECT(itr != req.end());
|
||||
BEAST_EXPECT(itr->value().empty());
|
||||
}
|
||||
|
||||
void
|
||||
run() override
|
||||
{
|
||||
@@ -1089,6 +1103,7 @@ public:
|
||||
|
||||
testIssue1828();
|
||||
boost::ignore_unused(&fields_test::testIssue2085);
|
||||
testEmpty();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user