Tidying and fix warnings

This commit is contained in:
seelabs
2016-05-10 21:21:19 -04:00
committed by Vinnie Falco
parent 97b1ac6eab
commit 09c566a6eb
13 changed files with 33 additions and 38 deletions

View File

@@ -474,14 +474,14 @@ public:
[](null_parser<true> const&)
{
});
parse_ev<true>(
"GET / HTTP/1.0\r\n"
"Content-Length: 1\r\n"
"Content-Length: 2\r\n"
"\r\n",
parse_error::bad_content_length);
parse_ev<true>(
"GET / HTTP/1.0\r\n"
"Transfer-Encoding: chunked\r\n"
@@ -489,7 +489,7 @@ public:
"fffffffffffffffff\r\n"
"0\r\n\r\n",
parse_error::bad_content_length);
parse_ev<true>("GET / HTTP/1.0\r\nContent-Length: 1e9\r\n\r\n",
parse_error::bad_content_length);
@@ -533,9 +533,8 @@ public:
{
using boost::asio::buffer;
std::string s;
std::size_t n;
for(n = 0;; ++n)
for(std::size_t n = 0;; ++n)
{
// Create a request and set one octet to an invalid char
s =
@@ -572,7 +571,7 @@ public:
}
}
for(n = 0;; ++n)
for(std::size_t n = 0;; ++n)
{
// Create a response and set one octet to an invalid char
s =

View File

@@ -72,19 +72,19 @@ public:
{
static_assert(std::is_constructible<
message<true, default_body, headers>>::value, "");
static_assert(std::is_constructible<
message<true, one_arg_body, headers>, Arg1>::value, "");
static_assert(std::is_constructible<
message<true, one_arg_body, headers>, Arg1 const>::value, "");
static_assert(std::is_constructible<
message<true, one_arg_body, headers>, Arg1 const&>::value, "");
static_assert(std::is_constructible<
message<true, one_arg_body, headers>, Arg1&&>::value, "");
static_assert(! std::is_constructible<
message<true, one_arg_body, headers>>::value, "");

View File

@@ -42,53 +42,53 @@ public:
{
fc_.fail(ec);
}
void on_method(boost::string_ref const&, error_code& ec)
{
fc_.fail(ec);
}
void on_uri(boost::string_ref const&, error_code& ec)
{
fc_.fail(ec);
}
void on_reason(boost::string_ref const&, error_code& ec)
{
fc_.fail(ec);
}
void on_request(error_code& ec)
{
fc_.fail(ec);
}
void on_response(error_code& ec)
{
fc_.fail(ec);
}
void on_field(boost::string_ref const&, error_code& ec)
{
fc_.fail(ec);
}
void on_value(boost::string_ref const&, error_code& ec)
{
fc_.fail(ec);
}
int on_headers(error_code& ec)
{
fc_.fail(ec);
return 0;
}
void on_body(boost::string_ref const&, error_code& ec)
{
fc_.fail(ec);
}
void on_complete(error_code& ec)
{
fc_.fail(ec);

View File

@@ -34,7 +34,7 @@ public:
class string_write_stream
{
boost::asio::io_service& ios_;
public:
std::string str;

View File

@@ -181,7 +181,7 @@ public:
check(fh);
}
}
void bad(std::initializer_list<std::uint8_t> bs)
{
using boost::asio::buffer;

View File

@@ -481,7 +481,6 @@ public:
{
stream<socket_type> ws;
explicit
con(endpoint_type const& ep, boost::asio::io_service& ios)
: ws(ios)
{