Refactor header and message constructors:

fix #581

* request and response headers now have convenience
  constructors so important fields like method, target,
  result, and version may be set upon construction.

Actions Required:

* Evaluate each message constructor call site and
  adjust the constructor argument list as needed.
This commit is contained in:
Vinnie Falco
2017-07-03 20:33:54 -07:00
parent 2ee088de5f
commit b0e52dd246
11 changed files with 487 additions and 210 deletions

View File

@@ -264,7 +264,7 @@ protected:
// We construct the dynamic body with a 1MB limit
// to prevent vulnerability to buffer attacks.
//
parser_.emplace(1024 * 1024);
parser_.emplace(std::piecewise_construct, std::make_tuple(1024 * 1024));
// Read just the header
beast::http::async_read_header(