Subject: Re: [boost] [beast] Chunking example
From: Vinnie Falco (vinnie.falco_at_[hidden])
Date: 2017-07-02 13:56:18
On Sun, Jul 2, 2017 at 6:52 AM, Bjorn Reese via Boost
> Can I differentiate between headers and trailers, or are they mixed together?
They are mixed together. You can look at the "Trailer" field after
receiving the header to know which trailers have been promised. And
then when the message is complete, inspect the headers again looking
for those specific fields.
If you absolutely need to distinguish them, for example to perform
more robust error checking, reject trailers which were not promised or
which are disallowed as per rfc7230, then you can subclass
basic_parser and provide a suitable implementation of on_field. In
this case you could store them in a separate container if desired.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk