Open vinipsmaker opened 8 years ago
Remove all (implicitly) allocating code (e.g. last_header).
This item made lot of progress on the read path of Socket
.
http::stream
It could work on client-side maybe: http://think-async.com/Urdl/doc/html/urdl/reference/core/read_stream.html
Memory management
boost::http::basic_socket
should be able to receive someparser_traits
. Suchparser_traits
should allow us to limit maximum HTTP header key and value sizes and it should also allow to limit number of headers as well as maximum body size. The point is that should be possible to avoid reallocations and leave memory management for the user. Other useful options are strict/liberal parser, predicate to decide whether header should be stored (blacklist wouldn't work)...basic_socket
should implement it. Other backends may not (On the non-hacky front).Message
concept to allow an implementation that will drop info at insertion time instead relying on C++11's container concepts. Text should be in the lines of something like "this operation potentially insert an element...". (How could a user provide a message concept that satifies the SequenceContainer for the body avoid memory allocations?...).last_header
).Others
Message
concept.HTTP/2.0
WON'T FIX
boost::http::socket
closer to Asio's socket. The suggestion wasn't developed enough.http::stream
. Actually, it won't be done for the next Boost submission, but I might (or might not) add it later.