mirror of
https://github.com/boostorg/beast.git
synced 2025-07-30 12:57:31 +02:00
Remove redundant use of static_string
This avoids an instantiation and copy of the data when adding the Server header field. Close #1613 Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
This commit is contained in:
@ -2,6 +2,7 @@ Version 256:
|
|||||||
|
|
||||||
* Remove uses of the deprecated `buffers` function
|
* Remove uses of the deprecated `buffers` function
|
||||||
* Remove uses of deprecated methods in websocket tests
|
* Remove uses of deprecated methods in websocket tests
|
||||||
|
* Remove redundant use of `static_string`
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -80,13 +80,8 @@ build_response(
|
|||||||
decorator_opt(res);
|
decorator_opt(res);
|
||||||
decorator(res);
|
decorator(res);
|
||||||
if(! res.count(http::field::server))
|
if(! res.count(http::field::server))
|
||||||
{
|
res.set(http::field::server,
|
||||||
// VFALCO this is weird..
|
string_view(BOOST_BEAST_VERSION_STRING));
|
||||||
BOOST_STATIC_ASSERT(sizeof(
|
|
||||||
BOOST_BEAST_VERSION_STRING) < 20);
|
|
||||||
static_string<20> s(BOOST_BEAST_VERSION_STRING);
|
|
||||||
res.set(http::field::server, s);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
auto err =
|
auto err =
|
||||||
[&](error e)
|
[&](error e)
|
||||||
|
Reference in New Issue
Block a user