mirror of
https://github.com/boostorg/beast.git
synced 2025-07-29 20:37:31 +02:00
Add message::header_part()
This commit is contained in:
@ -4,6 +4,7 @@ Version 61:
|
||||
* Use generic_cateogry for errno
|
||||
* Reorganize SSL examples
|
||||
* Tidy up some integer conversion warnings
|
||||
* Add message::header_part()
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
@ -300,8 +300,7 @@ void
|
||||
message<isRequest, Body, Fields>::
|
||||
prepare()
|
||||
{
|
||||
prepare(typename header<
|
||||
isRequest, Fields>::is_request{});
|
||||
prepare(typename header_type::is_request{});
|
||||
}
|
||||
|
||||
template<bool isRequest, class Body, class Fields>
|
||||
|
@ -322,7 +322,7 @@ struct header<false, Fields> : Fields
|
||||
*/
|
||||
void
|
||||
reason(string_view s);
|
||||
|
||||
|
||||
private:
|
||||
#if ! BEAST_DOXYGEN
|
||||
template<bool, class, class>
|
||||
@ -469,6 +469,20 @@ struct message : header<isRequest, Fields>
|
||||
std::tuple<BodyArgs...>&& body_args,
|
||||
std::tuple<HeaderArgs...>&& header_args);
|
||||
|
||||
/// Returns the header portion of the message
|
||||
header_type const&
|
||||
header_part() const
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
|
||||
/// Returns the header portion of the message
|
||||
header_type&
|
||||
header_part()
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
|
||||
/// Returns `true` if "close" is specified in the Connection field.
|
||||
bool
|
||||
has_close() const;
|
||||
|
Reference in New Issue
Block a user