diff --git a/CHANGELOG.md b/CHANGELOG.md index de4f4969..0f953191 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ Version 58: * Fix unaligned reads in utf8-checker * Qualify size_t in message template * Reorganize examples +* Specification for http read -------------------------------------------------------------------------------- diff --git a/include/beast/http/read.hpp b/include/beast/http/read.hpp index e79f19f8..95c479d6 100644 --- a/include/beast/http/read.hpp +++ b/include/beast/http/read.hpp @@ -604,7 +604,9 @@ async_read( dynamic buffer's input sequence will be given to the parser first. - @param msg An object to be overwritten with the message contents. + @param msg An object in which to store the message contents. + This object should not have previous contents, otherwise + the behavior is undefined. The type must be @b MoveAssignable and @b MoveConstructible. @throws system_error Thrown on failure. @@ -654,7 +656,9 @@ read( dynamic buffer's input sequence will be given to the parser first. - @param msg An object to be overwritten with the message contents. + @param msg An object in which to store the message contents. + This object should not have previous contents, otherwise + the behavior is undefined. The type must be @b MoveAssignable and @b MoveConstructible. @param ec Set to the error, if any occurred. @@ -709,8 +713,11 @@ read( dynamic buffer's input sequence will be given to the parser first. - @param msg An object to be overwritten with the message contents. + @param msg An object in which to store the message contents. + This object should not have previous contents, otherwise + the behavior is undefined. The type must be @b MoveAssignable and @b MoveConstructible. + The object must remain valid at least until the handler is called; ownership is not transferred.