From 129c7d8b78ad6be6274febf735216bd9d31df99e Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Mon, 23 Oct 2017 12:14:07 -0700 Subject: [PATCH] Remove serializer::keep_alive (API Change): * The serializer::keep_alive function is removed Actions Required: * Call message::keep_alive instead of serializer::keep_alive --- CHANGELOG.md | 8 ++++++ include/boost/beast/http/impl/serializer.ipp | 1 - include/boost/beast/http/serializer.hpp | 30 +------------------- 3 files changed, 9 insertions(+), 30 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ff34c4c4..cfebb9f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ Version 128: * Update doc links +API Changes: + +* Remove serializer::keep_alive + +Actions Required: + +* Call message::keep_alive instead of serializer::keep_alive + -------------------------------------------------------------------------------- Version 127: diff --git a/include/boost/beast/http/impl/serializer.ipp b/include/boost/beast/http/impl/serializer.ipp index ccbaa248..91bbe5f2 100644 --- a/include/boost/beast/http/impl/serializer.ipp +++ b/include/boost/beast/http/impl/serializer.ipp @@ -77,7 +77,6 @@ next(error_code& ec, Visit&& visit) { frdinit(std::integral_constant{}); - keep_alive_ = m_.keep_alive(); chunked_ = m_.chunked(); if(chunked_) goto go_init_c; diff --git a/include/boost/beast/http/serializer.hpp b/include/boost/beast/http/serializer.hpp index 2ba86608..2b02a395 100644 --- a/include/boost/beast/http/serializer.hpp +++ b/include/boost/beast/http/serializer.hpp @@ -31,12 +31,9 @@ namespace http { An object of this type is used to serialize a complete HTTP message into a sequence of octets. To use this class, construct an instance with the message to be serialized. - The implementation will automatically perform chunk encoding if the contents of the message indicate that chunk encoding - is required. If the semantics of the message indicate that - the connection should be closed after the message is sent, the - function @ref keep_alive will return `false`. + is required. Chunked output produced by the serializer never contains chunk extensions or trailers, and the location of chunk boundaries @@ -190,7 +187,6 @@ private: bool split_ = false; bool header_done_ = false; bool chunked_; - bool keep_alive_; bool more_; public: @@ -307,30 +303,6 @@ public: return chunked_; } - /** Return `true` if Connection: keep-alive semantic is indicated. - - This function returns `true` if the semantics of the - message indicate that the connection should be kept open - after the serialized message has been transmitted. The - value depends on the HTTP version of the message, - the tokens in the Connection header, and the metadata - describing the payload body. - - Depending on the payload body, the end of the message may - be indicated by connection closuire. In order for the - recipient (if any) to receive a complete message, the - underlying stream or network connection must be closed - when this function returns `false`. - - This function may only be called if @ref is_header_done - would return `true`. - */ - bool - keep_alive() - { - return keep_alive_; - } - /** Returns the next set of buffers in the serialization. This function will attempt to call the `visit` function