Refactor header status, reason, and target (API Change):

* header::result is a family of functions to replace header::status

* header interface now uses status enum and also ints

* reason-phrase is no longer stored unless the user explicitly
  requests it.

* When serializing, the standard reason is used for the
  corresponding status code unless the user has changed it.
This commit is contained in:
Vinnie Falco
2017-07-20 08:12:18 -07:00
parent 4f91e632bc
commit 3803c38dbd
30 changed files with 588 additions and 220 deletions
+6 -6
View File
@@ -103,12 +103,12 @@ public:
testMethodString()
{
f_t f;
f.method_string("CRY");
BEAST_EXPECTS(f.method_string() == "CRY", f.method_string());
f.method_string("PUT");
BEAST_EXPECTS(f.method_string() == "PUT", f.method_string());
f.method_string({});
BEAST_EXPECTS(f.method_string().empty(), f.method_string());
f.method_impl("CRY");
BEAST_EXPECTS(f.method_impl() == "CRY", f.method_impl());
f.method_impl("PUT");
BEAST_EXPECTS(f.method_impl() == "PUT", f.method_impl());
f.method_impl({});
BEAST_EXPECTS(f.method_impl().empty(), f.method_impl());
}
void run() override