forked from boostorg/beast
Replace static_string in parser
close #1574 This change yields a modest performance improment of 1-2% by replacing the exception-based handling of buffer overflow with one based on regular conditional checks. Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
This commit is contained in:
committed by
Vinnie Falco
parent
b7a8fb5178
commit
2cfe3ba1b8
@@ -14,7 +14,6 @@
|
||||
#include <boost/beast/http/error.hpp>
|
||||
#include <boost/beast/http/rfc7230.hpp>
|
||||
#include <boost/beast/core/buffer_traits.hpp>
|
||||
#include <boost/beast/core/static_string.hpp>
|
||||
#include <boost/beast/core/detail/clamp.hpp>
|
||||
#include <boost/beast/core/detail/config.hpp>
|
||||
#include <boost/asio/buffer.hpp>
|
||||
@@ -405,7 +404,7 @@ parse_fields(char const*& in,
|
||||
string_view name;
|
||||
string_view value;
|
||||
// https://stackoverflow.com/questions/686217/maximum-on-http-header-values
|
||||
static_string<max_obs_fold> buf;
|
||||
detail::char_buffer<max_obs_fold> buf;
|
||||
auto p = in;
|
||||
for(;;)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user