|
Boost : |
Subject: Re: [boost] [beast] Chunking example
From: Gavin Lambert (gavinl_at_[hidden])
Date: 2017-07-04 23:31:51
On 5/07/2017 06:18, Vinnie Falco wrote:
> You're talking about a "perpetual message" of some kind, where the end
> of the message never arrives. I think that's kind of an abuse of HTTP.
> Isn't Websocket more suited for that? It supports message boundaries
> which are not rewritten by intermediates (unlike HTTP).
>
> With respect to detecting chunk boundaries on input, this is possible,
> but... I can't guarantee it on output. In fact I'm not even sure how
> you would convince Beast to keep a message in "perpetually sending"
> mode since that is a use-case not anticipated by rfc7230.
Perpetual documents are relatively common in server push techniques,
even before chunked transfer was a thing. (multipart/x-mixed-replace
somewhat resembles chunked transfer, except with the behaviour that the
new content completely replaces the old content instead of being
appended to it.)
The other common pattern (Comet style long poll) is to accept a request
and parse the headers but then just keep the connection open
indefinitely before finally sending a response.
Granted these are both old technologies now and SSE and WebSockets are
"better", but there are still environments where the older ones work and
the newer ones don't, and examples still exist in the wild.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk