mirror of
https://github.com/boostorg/beast.git
synced 2025-07-29 20:37:31 +02:00
Add serializer::chunked
This commit is contained in:
@ -4,6 +4,7 @@ Version 76:
|
||||
* Use Boost.Config
|
||||
* BodyReader may construct from a non-const message
|
||||
* Add serializer::get
|
||||
* Add serializer::chunked
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
@ -87,7 +87,8 @@ next(error_code& ec, Visit&& visit)
|
||||
frdinit(std::integral_constant<bool,
|
||||
isRequest>{});
|
||||
close_ = ! frd_->keep_alive();
|
||||
if(frd_->chunked())
|
||||
chunked_ = frd_->chunked();
|
||||
if(chunked_)
|
||||
goto go_init_c;
|
||||
s_ = do_init;
|
||||
BEAST_FALLTHROUGH;
|
||||
|
@ -385,6 +385,17 @@ public:
|
||||
return s_ == do_complete;
|
||||
}
|
||||
|
||||
/** Return `true` if the serializer will apply chunk-encoding.
|
||||
|
||||
This function may only be called if @ref is_header_done
|
||||
would return `true`.
|
||||
*/
|
||||
bool
|
||||
chunked()
|
||||
{
|
||||
return chunked_;
|
||||
}
|
||||
|
||||
/** Return `true` if Connection: close semantic is indicated.
|
||||
|
||||
Depending on the contents of the message, the end of
|
||||
@ -392,6 +403,9 @@ public:
|
||||
for the recipient (if any) to receive a complete message,
|
||||
the underlying network connection must be closed when this
|
||||
function returns `true`.
|
||||
|
||||
This function may only be called if @ref is_header_done
|
||||
would return `true`.
|
||||
*/
|
||||
bool
|
||||
need_close() const
|
||||
|
Reference in New Issue
Block a user