Commit Graph

365 Commits

Author SHA1 Message Date
Vinnie Falco 82d76e4882 Convert buffer in range loops
fix #485
2017-07-20 08:12:20 -07:00
Vinnie Falco ca109693fb Reset error codes
fix #478
2017-07-20 08:12:20 -07:00
Vinnie Falco 5058217c35 HTTP/1 is the default version
fix #482
2017-07-20 08:12:20 -07:00
Vinnie Falco 0eb3a6b77e Call on_chunk when the extension is empty
fix #435
2017-07-20 08:12:20 -07:00
Vinnie Falco 7712ca09b2 Add string_view_body 2017-07-20 08:12:20 -07:00
Vinnie Falco 914765c3cf Tidy up 2017-07-20 08:12:20 -07:00
Vinnie Falco 0f54bc72a4 Add provisional IANA header field names
fix #473
2017-07-20 08:12:20 -07:00
Vinnie Falco 4b5ffeff1e Set version to 55 2017-07-20 08:12:20 -07:00
Vinnie Falco 7bde07a850 Documentation work 2017-07-20 08:12:20 -07:00
Vinnie Falco a49c096042 read_size replaces read_size_helper:
* detail::read_size_helper is removed

* public function read_size helps determine the optimum
  size for calls to a DynamicBuffer's prepare function.

* special case for Asio types which don't conform to
  the concept but have their own helper function.
2017-07-20 08:12:20 -07:00
Vinnie Falco fe4dfed27b Tidy up type_traits 2017-07-20 08:12:19 -07:00
Vinnie Falco ff8be0e931 Avoid a parser allocation using non-flat buffer:
When the parser is presented with an input buffer
sequence with length greater than one, the input is
flattened using stack space instead of dynamic
allocation if the buffer size is no greater than 8192.
2017-07-20 08:12:19 -07:00
Vinnie Falco 87c6e69d9f Don't allocate memory to handle obs-fold 2017-07-20 08:12:19 -07:00
Vinnie Falco add95d6ef6 Set version to 54 2017-07-20 08:12:19 -07:00
Vinnie Falco d529d6a16f Documentation work 2017-07-20 08:12:19 -07:00
Vinnie Falco 857fc22667 Fix incorrect use of [[fallthrough]]
fix #468
2017-07-20 08:12:19 -07:00
Vinnie Falco f44380159a Retain ownership when reading using a message
fix #469
2017-07-20 08:12:19 -07:00
Vinnie Falco 8c4136bb73 basic_fields refactor (API Change):
* Container interface more closely matches std::vector

* While preserving the invariant that duplicate fields
  with the same case-insensitive name have their order
  preserved.
2017-07-20 08:12:19 -07:00
Vinnie Falco 0d70d90b75 Add string_param
fix #451
2017-07-20 08:12:19 -07:00
Vinnie Falco 49a2b33b82 basic_fields members and coverage 2017-07-20 08:12:19 -07:00
Vinnie Falco e58833d7dd consuming_buffers members and coverage 2017-07-20 08:12:19 -07:00
Vinnie Falco 260b506520 multi_buffer members and coverage
fix #458
2017-07-20 08:12:19 -07:00
Vinnie Falco 5d6d486da4 flat_buffer coverage 2017-07-20 08:12:19 -07:00
Vinnie Falco 99f2425de4 static_buffer coverage 2017-07-20 08:12:19 -07:00
Vinnie Falco 4a3b42b398 Set version to 53 2017-07-20 08:12:19 -07:00
Vinnie Falco 78f4858e98 Fix read_size_helper usage:
read_size_helper can return zero if the buffer reaches
its maximum size, causing infinite loops in HTTP. The
function maybe_read_size_helper is provided to throw
an exception instead of returning a value for this case.
2017-07-20 08:12:19 -07:00
Vinnie Falco e4fdeecc3b Fix basic_parser::maybe_flatten (#462) 2017-07-20 08:12:19 -07:00
Vinnie Falco 140246957e Set version to 52 2017-07-20 08:12:19 -07:00
Vinnie Falco 5149cf8495 Add drain_buffer class
fix #457
2017-07-20 08:12:19 -07:00
Vinnie Falco 23863230de flat_buffer is an AllocatorAwareContainer
fix #453
2017-07-20 08:12:19 -07:00
Vinnie Falco 44995bf071 Documentation work 2017-07-20 08:12:19 -07:00
Vinnie Falco b49b23ee83 finish(error_code&) is a BodyReader requirement (API Change) 2017-07-20 08:12:19 -07:00
Vinnie Falco 64742a4183 opcode is private (API Change):
* The opcode enum is removed.

Actions Required:

* Remove all occurences of the `opcode` enum at call sites
2017-07-20 08:12:19 -07:00
Vinnie Falco 6c9bdd2c32 Documentation work 2017-07-20 08:12:19 -07:00
Vinnie Falco 9e910761cc read_frame returns bool fin (API Change):
* frame_info struct is removed

* read_frame and async_read_frame return a bool indicating
  if the frame is the last frame of the current message.

Actions Required:

* Remove the frame_info parameter from all read frame call sites

* Check the return value 'fin' for calls to read_frame

* Change ReadHandlers passed to async_read_frame to have
  the signature void(error_code, bool fin), use the bool
  to indicate if the frame is the last frame.
2017-07-20 08:12:19 -07:00
Vinnie Falco 620ce08d6a Remove opcode from read, async_read (API Change):
fix #446

* Read signatures no longer include `opcode`

* stream::got_binary and stream::got_text inform the caller if
  the current incoming message is binary or text.

Actions Required:

* Remove the `opcode` reference parameter from calls to synchronous
  and asynchronous read functions, replace the logic with calls to
  stream::got_binary and stream::got_text instead.
2017-07-20 08:12:19 -07:00
Vinnie Falco 3d6574da81 ping_callback is a member of stream (API Change):
fix #446

* The ping_callback option struct is removed.

Actions Required:

* Change call sites which use ping_callback with set_option to
  call stream::ping_callback instead.
2017-07-20 08:12:19 -07:00
Vinnie Falco 333067243f write_buffer_size is a member of stream (API Change):
fix #446

* The write_buffer_size option struct is removed.

Actions Required:

* Change call sites which use write_buffer_size with set_option to
  call stream::write_buffer_size instead.
2017-07-20 08:12:19 -07:00
Vinnie Falco b9dbb76c4f read_message_max is a member of stream (API Change):
fix #446

* The read_message_max option struct is removed.

Actions Required:

* Change call sites which use read_message_max with set_option to
  call stream::read_message_max instead.
2017-07-20 08:12:19 -07:00
Vinnie Falco 513a54835c read_buffer_size is a member of stream (API Change):
fix #446

* The read_buffer_size option struct is removed

Actions Required:

* Change call sites which use read_buffer_size with set_option to
  call stream::read_buffer_size instead.
2017-07-20 08:12:19 -07:00
Vinnie Falco e6c0d698ee binary, text are members of stream (API Change):
fix #446

* message_type is removed

Actions Required:

* Change call sites which use message_type with set_option
  to call stream::binary or stream::text instead.
2017-07-20 08:12:19 -07:00
Vinnie Falco f22895224b auto_fragment is a member of stream (API Change):
fix #374, fix #446

* auto_fragment option struct is removed

Actions Required:

* Change call sites which use auto_fragment with set_option
  to call stream::auto_fragment instead.
2017-07-20 08:12:19 -07:00
Vinnie Falco 669b1feae1 Documentation work 2017-07-20 08:12:19 -07:00
Vinnie Falco eaa820df30 Set version to 51 2017-07-20 08:12:19 -07:00
Vinnie Falco 04522398e0 Fix infinite loop in basic_parser
fix #452
2017-07-20 08:12:19 -07:00
Vinnie Falco 7b56f352b4 Add construct, destroy to handler_alloc
fix #432
2017-07-20 08:12:19 -07:00
Vinnie Falco 196d9c60fa multi_buffer implementation change (API Change):
fix #440

WARNING

multi_buffer constructor now takes a maximum size instead of the
"allocation size". This is a breaking change. The allocation size
feature is removed. To update calling code, remove the allocation
size parameter from call sites.

* multi_buffer now uses a geometric growth algorithm for better performance.
2017-07-20 08:12:19 -07:00
Vinnie Falco 4bbb21d7af Use BOOST_STRINGIZE
fix #384
2017-07-20 08:12:19 -07:00
Vinnie Falco 55358835c6 Use BOOST_FALLTHROUGH
fix #437
2017-07-20 08:12:19 -07:00
Vinnie Falco cff5be3837 Documentation work 2017-07-20 08:12:19 -07:00