forked from boostorg/beast
Canonicalize string_view parameter types
This commit is contained in:
1 parent
ac175cb694
commit
7d267f46b0
22 files changed
+141
-140
No files matched your search
@@ -217,7 +217,7 @@ public:
|
||||
|
||||
template<bool isRequest, class Pred>
|
||||
void
|
||||
good(string_view const& s,
|
||||
good(string_view s,
|
||||
Pred const& pred, bool skipBody = false)
|
||||
{
|
||||
using boost::asio::buffer;
|
||||
@@ -239,7 +239,7 @@ public:
|
||||
|
||||
template<bool isRequest>
|
||||
void
|
||||
good(string_view const& s)
|
||||
good(string_view s)
|
||||
{
|
||||
good<isRequest>(s,
|
||||
[](test_parser<isRequest> const&)
|
||||
@@ -249,7 +249,7 @@ public:
|
||||
|
||||
template<bool isRequest>
|
||||
void
|
||||
bad(string_view const& s,
|
||||
bad(string_view s,
|
||||
error_code const& ev, bool skipBody = false)
|
||||
{
|
||||
using boost::asio::buffer;
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace http {
|
||||
|
||||
template<class = void>
|
||||
std::string
|
||||
escaped_string(string_view const& s)
|
||||
escaped_string(string_view s)
|
||||
{
|
||||
std::string out;
|
||||
out.reserve(s.size());
|
||||
|
||||
@@ -165,22 +165,22 @@ public:
|
||||
boost::asio::mutable_buffers_1;
|
||||
|
||||
void
|
||||
on_request(string_view const&,
|
||||
string_view const&,
|
||||
on_request(string_view,
|
||||
string_view,
|
||||
int, error_code&)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
on_response(int,
|
||||
string_view const&,
|
||||
string_view,
|
||||
int, error_code&)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
on_field(string_view const&,
|
||||
string_view const&,
|
||||
on_field(string_view,
|
||||
string_view,
|
||||
error_code&)
|
||||
{
|
||||
}
|
||||
@@ -197,14 +197,14 @@ public:
|
||||
}
|
||||
|
||||
void
|
||||
on_data(string_view const&,
|
||||
on_data(string_view,
|
||||
error_code& ec)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
on_chunk(std::uint64_t,
|
||||
string_view const&,
|
||||
string_view,
|
||||
error_code&)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ public:
|
||||
|
||||
static
|
||||
std::string
|
||||
str(string_view const& s)
|
||||
str(string_view s)
|
||||
{
|
||||
return std::string(s.data(), s.size());
|
||||
}
|
||||
@@ -241,7 +241,7 @@ public:
|
||||
template<class Policy>
|
||||
static
|
||||
std::vector<std::string>
|
||||
to_vector(string_view const& in)
|
||||
to_vector(string_view in)
|
||||
{
|
||||
std::vector<std::string> v;
|
||||
detail::basic_parsed_list<Policy> list{in};
|
||||
@@ -253,7 +253,7 @@ public:
|
||||
|
||||
template<class Policy>
|
||||
void
|
||||
validate(string_view const& in,
|
||||
validate(string_view in,
|
||||
std::vector<std::string> const& v)
|
||||
{
|
||||
BEAST_EXPECT(to_vector<Policy>(in) == v);
|
||||
@@ -261,7 +261,7 @@ public:
|
||||
|
||||
template<class Policy>
|
||||
void
|
||||
good(string_view const& in)
|
||||
good(string_view in)
|
||||
{
|
||||
BEAST_EXPECT(validate_list(
|
||||
detail::basic_parsed_list<Policy>{in}));
|
||||
@@ -269,7 +269,7 @@ public:
|
||||
|
||||
template<class Policy>
|
||||
void
|
||||
good(string_view const& in,
|
||||
good(string_view in,
|
||||
std::vector<std::string> const& v)
|
||||
{
|
||||
BEAST_EXPECT(validate_list(
|
||||
@@ -279,7 +279,7 @@ public:
|
||||
|
||||
template<class Policy>
|
||||
void
|
||||
bad(string_view const& in)
|
||||
bad(string_view in)
|
||||
{
|
||||
BEAST_EXPECT(! validate_list(
|
||||
detail::basic_parsed_list<Policy>{in}));
|
||||
|
||||
@@ -47,8 +47,8 @@ public:
|
||||
}
|
||||
|
||||
void
|
||||
on_request(string_view const& method_,
|
||||
string_view const& path_,
|
||||
on_request(string_view method_,
|
||||
string_view path_,
|
||||
int version_, error_code& ec)
|
||||
{
|
||||
method = std::string(
|
||||
@@ -63,7 +63,7 @@ public:
|
||||
|
||||
void
|
||||
on_response(int status_,
|
||||
string_view const& reason_,
|
||||
string_view reason_,
|
||||
int version_, error_code& ec)
|
||||
{
|
||||
status = status_;
|
||||
@@ -76,8 +76,8 @@ public:
|
||||
}
|
||||
|
||||
void
|
||||
on_field(string_view const&,
|
||||
string_view const&,
|
||||
on_field(string_view,
|
||||
string_view,
|
||||
error_code& ec)
|
||||
{
|
||||
got_on_field = true;
|
||||
@@ -106,7 +106,7 @@ public:
|
||||
}
|
||||
|
||||
void
|
||||
on_data(string_view const& s,
|
||||
on_data(string_view s,
|
||||
error_code& ec)
|
||||
{
|
||||
body.append(s.data(), s.size());
|
||||
@@ -116,7 +116,7 @@ public:
|
||||
|
||||
void
|
||||
on_chunk(std::uint64_t,
|
||||
string_view const&, error_code& ec)
|
||||
string_view, error_code& ec)
|
||||
{
|
||||
got_on_chunk = true;
|
||||
if(fc_)
|
||||
|
||||
Reference in new issue
Block a user