#include <boost/beast/core/string.hpp>
#include <boost/beast/core/detail/buffers_ref.hpp>
#include <boost/beast/core/detail/clamp.hpp>
+#include <boost/beast/core/detail/static_string.hpp>
#include <boost/beast/core/detail/temporary_buffer.hpp>
+#include <boost/beast/core/static_string.hpp>
#include <boost/beast/http/verb.hpp>
#include <boost/beast/http/rfc7230.hpp>
#include <boost/beast/http/status.hpp>
inline
void
basic_fields<Allocator>::
-insert(field name, string_param const& value)
+insert(field name, string_view const& value)
{
BOOST_ASSERT(name != field::unknown);
insert(name, to_string(name), value);
template<class Allocator>
void
basic_fields<Allocator>::
-insert(string_view sname, string_param const& value)
+insert(string_view sname, string_view const& value)
{
auto const name =
string_to_field(sname);
void
basic_fields<Allocator>::
insert(field name,
- string_view sname, string_param const& value)
+ string_view sname, string_view const& value)
{
auto& e = new_element(name, sname,
static_cast<string_view>(value));
template<class Allocator>
void
basic_fields<Allocator>::
-set(field name, string_param const& value)
+set(field name, string_view const& value)
{
BOOST_ASSERT(name != field::unknown);
set_element(new_element(name, to_string(name),
template<class Allocator>
void
basic_fields<Allocator>::
-set(string_view sname, string_param const& value)
+set(string_view sname, string_view const& value)
{
set_element(new_element(
- string_to_field(sname), sname,
- static_cast<string_view>(value)));
+ string_to_field(sname), sname, value));
}
template<class Allocator>
if(! value)
erase(field::content_length);
else
- set(field::content_length, *value);
+ {
+ set(field::content_length,
+ to_static_string(*value));
+ }
}
template<class Allocator>