diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f9e3759..3fadbebf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ HTTP: * Tidy up set payload in http-server-fast * Refine Body::size specification +* Newly constructed responses have a 200 OK result -------------------------------------------------------------------------------- diff --git a/include/beast/http/message.hpp b/include/beast/http/message.hpp index 7fcd5650..ec7692a7 100644 --- a/include/beast/http/message.hpp +++ b/include/beast/http/message.hpp @@ -34,6 +34,10 @@ namespace http { the default fields container, those declarations are in @ref fields. + Newly constructed header objects have version set to + HTTP/1.1. Newly constructed response objects also have + result code set to @ref status::ok. + A `header` includes the start-line and header-fields. */ #if BEAST_DOXYGEN @@ -343,7 +347,7 @@ private: void swap(header& m1, header& m2); - status result_; + status result_ = status::ok; #endif }; @@ -371,6 +375,10 @@ using response_header = header; The `Body` template argument type determines the model used to read or write the content body of the message. + Newly constructed messages objects have version set to + HTTP/1.1. Newly constructed response objects also have + result code set to @ref status::ok. + @tparam isRequest `true` if this represents a request, or `false` if this represents a response. Some class data members are conditionally present depending on this value.