Commit Graph
230 Commits
Author SHA1 Message Date
Sacha 906db45bec Add a Beast CMake interface target:
fix #461

This target allows other CMake projects to acquire
the Beast headers and link libraries easily.
2017-06-11 18:26:22 -07:00
Vinnie Falco 296ef3b0af Documentation work 2017-06-11 18:24:00 -07:00
Vinnie Falco a71bb2b710 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-06-11 08:48:26 -07:00
Vinnie Falco d8d3562c0f Add string_param
fix #451
2017-06-11 08:48:25 -07:00
Vinnie Falco 83b2558524 basic_fields members and coverage 2017-06-10 19:49:44 -07:00
Vinnie Falco c4f5fa5cf5 consuming_buffers members and coverage 2017-06-10 19:49:44 -07:00
Vinnie Falco e10507c9da multi_buffer members and coverage
fix #458
2017-06-10 19:49:40 -07:00
Vinnie Falco 0e6bd3f043 flat_buffer coverage 2017-06-10 16:00:42 -07:00
Vinnie Falco 7351d6eae4 static_buffer coverage 2017-06-10 16:00:42 -07:00
Vinnie Falco 3ef0359327 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-06-10 13:15:17 -07:00
Vinnie Falco b0ceb2ae51 Add drain_buffer class
fix #457
2017-06-09 19:56:00 -07:00
Vinnie Falco 4c6735afe4 flat_buffer is an AllocatorAwareContainer
fix #453
2017-06-09 19:56:00 -07:00
Vinnie Falco 9d5d4d56a4 Documentation work 2017-06-09 18:07:20 -07:00
Vinnie Falco d4ec693a61 finish(error_code&) is a BodyReader requirement (API Change) 2017-06-09 18:07:20 -07:00
Vinnie Falco 7b24cad6c3 opcode is private (API Change):
* The opcode enum is removed.

Actions Required:

* Remove all occurences of the `opcode` enum at call sites
2017-06-09 18:07:19 -07:00
Vinnie Falco a1ff89b432 Disable std::future snippet for libstdc++ bug 2017-06-09 18:07:19 -07:00
Vinnie Falco b5ef664736 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-06-09 18:07:19 -07:00
Vinnie Falco 7911847563 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-06-09 18:07:14 -07:00
Vinnie Falco c72d70ff3f 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-06-09 13:41:04 -07:00
Vinnie Falco 720a3096c9 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-06-09 13:41:04 -07:00
Vinnie Falco 7ff0178871 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-06-09 13:41:04 -07:00
Vinnie Falco cd40964aa4 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-06-09 13:41:04 -07:00
Vinnie Falco a58e5e11dc 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-06-09 13:41:03 -07:00
Vinnie Falco ad35846c4d 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-06-09 13:41:03 -07:00
Vinnie Falco ccee1392eb Documentation work 2017-06-09 13:41:03 -07:00
Vinnie Falco cafc8e25c2 Fix infinite loop in basic_parser
fix #452
2017-06-09 13:33:03 -07:00
Vinnie Falco dc4b69d8bc Add construct, destroy to handler_alloc
fix #432
2017-06-08 19:36:51 -07:00
Vinnie Falco 58c2739115 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-06-08 19:36:51 -07:00
Vinnie Falco dd7f5c03f8 DynamicBuffer benchmarks
fix #441
2017-06-08 19:36:51 -07:00
Vinnie Falco 31051ac51b Use BOOST_FALLTHROUGH
fix #437
2017-06-08 06:41:27 -07:00
Vinnie Falco 8f2430be64 Documentation work 2017-06-08 05:47:01 -07:00
Vinnie Falco 53cbeea596 Tune up static_buffer (API Change):
The static buffer is updated:

* reset() is no longer a member. Use b.consume(b.size()) instead.

* Simplified implementaton, uses asio instead of custom types

* Better stream performance: consuming the input makes room
  available in the output. This class is now suitable for
  HTTP reads.

These changes permit the static_buffer wrapper to adapt a user
memory buffer if desired, including a stack based array.
The static_buffer_n class may also be used for this purpose,
it comes with its own storage.
2017-06-07 19:21:33 -07:00
Vinnie Falco 4df68852a7 Fix chunk header parsing
fix #431, fix #430
2017-06-07 18:18:56 -07:00
Vinnie Falco 3bd82600a0 Remove obsolete serializer allocator (API Change) 2017-06-07 18:18:56 -07:00
Vinnie Falco 001c97950c Remove message free functions (API Change) 2017-06-07 18:18:55 -07:00
Vinnie Falco 745876b9bf Remove message connection settings (API Change) 2017-06-07 18:18:55 -07:00
Vinnie Falco 1e303b0cf6 Fields concept work 2017-06-07 18:18:55 -07:00
Vinnie Falco 3ba81b5474 Use field in basic_parser 2017-06-07 18:18:54 -07:00
Vinnie Falco b5f6cc1724 Use field in basic_fields and call sites 2017-06-07 18:18:54 -07:00
Vinnie Falco 2adc80aa6a Protect basic_fields special members (API Change) 2017-06-07 18:18:54 -07:00
Vinnie Falco d8febdae76 Documentation work 2017-06-07 18:18:50 -07:00
Vinnie Falco 485a6e55ee Refactor prepare (API Change) 2017-06-06 13:25:44 -07:00
Vinnie Falco 9fd307178f Derive header from Fields (API Change) 2017-06-06 13:25:43 -07:00
Vinnie Falco 8ad26b8f5d Use allocator more in basic_fields
Fix #392
2017-06-06 13:25:43 -07:00
Vinnie Falco 0071039d7f Add verb to on_request for parsers (API Change) 2017-06-06 13:25:43 -07:00
Vinnie Falco 74f6cbb117 Add field enumeration 2017-06-06 13:25:43 -07:00
Vinnie Falco 054ac40192 Remove header_parser (API Change) 2017-06-05 16:09:38 -07:00
Vinnie Falco a007eba09c parser is constructible from other body types 2017-06-05 16:09:38 -07:00
Vinnie Falco af47128f0b Documentation work 2017-06-05 16:04:35 -07:00
Vinnie Falco a1848f09ce Add HEAD request example 2017-06-04 17:26:21 -07:00