Commit Graph
1262 Commits
Author SHA1 Message Date
Vinnie Falco 3c44398e8d Retain ownership when reading using a message
fix #469
2017-06-11 11:49:46 -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 18a8ef5a3b Set version to 53 2017-06-10 16:00:27 -07:00
Vinnie Falco 452df5901d Remove extraneous doc file 2017-06-10 16:00:23 -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 b64e6d312d Fix basic_parser::maybe_flatten (#462) 2017-06-10 06:45:11 -07:00
Vinnie Falco 76402f7d92 Set version to 52 2017-06-09 19:56:03 -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 068c2ac1ce Documentation work 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 13c64e3439 Set version to 51 2017-06-09 13:33:06 -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 1c4811b821 Use BOOST_STRINGIZE
fix #384
2017-06-08 06:42:17 -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
Niklas Schnelle eb35b9212a Fix file_body::get() not setting the more flag correctly
The check for more data actually checked if the end of data was reached
so it was logically inverted.

This fixes #434
2017-06-08 05:47:01 -07:00
Vinnie Falco 566244adc1 Tidy up file_body
fix #439
2017-06-08 05:44:09 -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 20c59b7e22 Fix operator<< for header 2017-06-07 19:21:32 -07:00
Vinnie Falco a2c1117fc0 Set version to 50 2017-06-07 18:18:59 -07:00
Vinnie Falco 6045b746e3 http read_some, async_read_some don't return bytes (API Change):
fix #431, fix #430

The read_some and async_read_some HTTP operations no longer
return the number of bytes that the caller should consume.
Instead, the bytes are automatically removed from the dynamic
buffer as indicated by the parser.
2017-06-07 18:18:56 -07:00
Vinnie Falco 4df68852a7 Fix chunk header parsing
fix #431, fix #430
2017-06-07 18:18:56 -07:00
Vinnie Falco 36bf32bc45 Fix test::pipe read_size 2017-06-07 18:18:56 -07:00
Vinnie Falco bf69ce1683 Fix chunk delimiter parsing 2017-06-07 18:18:56 -07:00
Vinnie Falco 0c6b6b1a00 Add missing handler_alloc nested types
fix #432
2017-06-07 18:18:56 -07:00
Vinnie Falco a06b8f9be3 Tidy up message javadoc 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