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