2017-10-14 16:54 GMT-03:00 Vinnie Falco via Boost
Note how the collection of types presented for a header field is different from the request-line. Expressing this irregular stream of different types through an iterator interface is going to be very clumsy. Furthermore, there is metadata generated during the parse which is not easily reflected in an iterator interface.
For example, after the HTTP headers have been parsed, Beast calculates the "keep-alive" semantic as well as the disposition of the Content-Length, which may be in three states: body-to-eof, chunked, or known. The keep-alive semantics are communicated to the caller of the parser through a member function `basic_parser::is_keep_alive`:
<http://www.boost.org/doc/libs/master/libs/beast/doc/ html/beast/ref/boost__beast__http__basic_parser/is_keep_alive.html>
The result/state stays in `basic_parser`. In other words, it stays in the parser object. How is this different from any other model? -- VinÃcius dos Santos Oliveira https://vinipsmaker.github.io/