forked from boostorg/beast
basic_parser: apply header_limit_ to trailer headers
This commit is contained in:
committed by
Mohammad Nejati
parent
f181fbf6e4
commit
a620d4175a
@@ -859,6 +859,26 @@ public:
|
||||
BEAST_EXPECT(! p.is_done());
|
||||
BEAST_EXPECTS(ec == error::header_limit, ec.message());
|
||||
}
|
||||
{
|
||||
multi_buffer b;
|
||||
ostream(b) <<
|
||||
"POST / HTTP/1.1\r\n"
|
||||
"Transfer-Encoding: chunked\r\n"
|
||||
"\r\n"
|
||||
"0\r\n";
|
||||
error_code ec;
|
||||
test_parser<true> p;
|
||||
p.header_limit(47);
|
||||
p.eager(true);
|
||||
b.consume(p.put(b.data(), ec));
|
||||
BEAST_EXPECTS(ec == error::need_more, ec.message());
|
||||
ostream(b) <<
|
||||
"field: value\r\n"
|
||||
"\r\n";
|
||||
b.consume(p.put(b.data(), ec));
|
||||
BEAST_EXPECT(! p.is_done());
|
||||
BEAST_EXPECTS(ec == error::header_limit, ec.message());
|
||||
}
|
||||
{
|
||||
multi_buffer b;
|
||||
ostream(b) <<
|
||||
|
||||
Reference in New Issue
Block a user