105 Commits
Author SHA1 Message Date
Vinnie Falco 0f3696f2ec Unit test framework is experimental 2018-11-11 13:56:05 -08:00
compmaniak 955b7b31a5 Fix parsing of out-of-bounds hex values
fix #1267
2018-10-20 08:40:27 -07:00
Vinnie Falco e2d192ec78 Remove extraneous function 2018-10-07 10:35:12 -07:00
Glen Fernandes 5e98c78951 Use boost::empty_value
fix #1233
2018-09-23 10:12:08 -07:00
Vinnie Falco 5fd2bd445c Add parse_dec tests 2018-07-29 17:39:03 -07:00
Joe Loser 283c9f26f3 Remove some unused variables
fix #1197
2018-07-23 09:20:51 -07:00
Vinnie Falco 92d34b9e3b Use static_cast instead
fix #1163
2018-07-15 09:11:15 -07:00
Vinnie Falco e8c6a82c3b Add test for issue #1188 2018-07-12 08:49:25 -07:00
Vinnie Falco 24bbda7b0d Add const and non-const overloads for message based http writes:
fix #1113

This solves a problem where the message-oriented synchronous
HTTP write algorithms do not support messages whose body
writer requires a non-const reference to the message in
order to construct.

In addition, the message-oriented async_write algorithm is
modified to support messages passed by const reference when
possible, based on the body writer attributes.
2018-05-06 19:57:25 -07:00
Vinnie Falco 416f84bc63 Remove deprecated Body reader and writer ctor signatures 2018-05-04 12:47:27 -07:00
Vinnie Falco a94efc8c92 Add test::stream to experimental 2018-05-02 08:32:09 -07:00
Vinnie Falco e4c2ae6384 Add test::fail_count to experimental 2018-05-02 08:32:09 -07:00
Vinnie Falco 59f01a158b Add test::error to experimental 2018-05-02 08:32:09 -07:00
Vinnie Falco 14392d7f52 Use buffers_to_string in tests
fix #782
2018-04-24 10:55:39 -07:00
Ivan Vilata-i-Balaguer edd162cf3b Add Access-Control-Expose-Headers field constant:
This response header is described both in [CORS](https://www.w3.org/TR/cors/)
and [Fetch](https://fetch.spec.whatwg.org/) specifications.
2018-03-09 09:29:14 -08:00
Vinnie Falco 726118468b Add asio_handler_invoke overloads for stream algorithms:
fix #1012

This fixes a bug where asynchronous stream alogrithms do not
work correctly with the legacy `io_service::strand` implementation.
2018-03-01 08:31:57 -08:00
Peter Jankuliak 4fb535ece6 Fix iterator version of basic_fields::erase
fix #994
2018-01-25 06:02:43 -08:00
Damian Jarek b76ab4450a New BodyReader and BodyWriter constructors (API Change):
fix #884

* BodyReader and BodyWriter constructors now require the header and
  body elements to be passed as distinct header and value_type objects.

This enables the composition of body types, for example:

    http::response<compressed_body<http::string_body>> res;

* The previous single-argument constructors are deprecated and will be
  removed in a subsequent version.

Actions Required:

* Change user-defined instances of BodyReader or BodyWriter constructor
  signatures to the two-argument form.

OR

* Define the macro BOOST_BEAST_ALLOW_DEPRECATED in the project (which
  will accept both the new and the deprecated signatures).
2017-12-15 09:27:39 -08:00
Damian Jarek 200e898f7e Don't copy completion handlers:
All asynchronous operations will now be able to use move-only
CompletionHandlers.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2017-12-04 12:14:40 -08:00
Damian Jarek 190d20e3a8 Tidy up basic_fields exception specifiers
fix #894

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2017-11-28 04:51:18 -08:00
Vinnie Falco c37ce4b15e Fix name typo in http write test 2017-11-11 09:41:06 -08:00
Casey Bodley f96785df4f Fix signature for async_read_some, and tests
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2017-11-08 19:58:46 -08:00
Vinnie Falco 5177d729a7 Remove const&& overload of message::body 2017-10-31 14:43:10 -07:00
Vinnie Falco 895c9fa7ed BodyReader and BodyWriter names are swapped (API Change):
Body::reader and Body::writer meanings are reversed, for
consistency with the names of the stream operations:

* Body::reader is used for read, read_some, async_read, async_read_some
* Body::writer is used for write, write_some, async_write, async_write_some

Actions Required:

* Swap the reader and writer names for user defined Body types
* Swap use of is_body_reader and is_body_writer
2017-10-30 18:13:40 -07:00
Vinnie Falco 23bf8638ab Add ref-qualified overloads for message::body 2017-10-30 15:23:43 -07:00
Vinnie Falco e39e4c73bf Rename Cmake variables for clarity 2017-10-30 12:35:56 -07:00
Vinnie Falco 42679ee0bc Tidy up project folders in CMakeLists.txt 2017-10-30 12:35:55 -07:00
Vinnie Falco 1754d5427d Add message::need_eof 2017-10-25 18:41:04 -07:00
Vinnie Falco 5c14ab9f7c Rename some basic_parser observers (API Change):
Some `basic_parser` member functions are renamed:

* chunked() was is_chunked()
* upgrade() was is_upgrade()
* keep_alive() was is_keep_alive()

Actions Required:

* Rename member function invocations at call sites
2017-10-25 18:04:54 -07:00
Vinnie Falco 6225c5bd2f Add has_content_length_impl to Fields (API Change):
* The function has_content_length_impl is added to the
  requirements of Fields.

Actions Required:

* Implement has_content_length_impl for user-defined Fields
2017-10-25 17:58:45 -07:00
Vinnie Falco 3a28e999af Update for Net-TS Asio (API Change):
fix #769

The following classes are removed:

* handler_type
* async_result
* async_completion
* is_dynamic_buffer
* is_const_buffer_sequence
* is_mutable_buffer_sequence
* handler_alloc

Actions Required:

* Use BOOST_ASIO_HANDLER_TYPE instead of handler_type
* Use BOOST_ASIO_INITFN_RESULT_TYPE instead of async_result
* Use boost::asio::async_completion
* Use boost::asio::is_dynamic_buffer
* Use boost::asio::is_const_buffer_sequence
* Use boost::asio::is_mutable_buffer_sequence
* boost::asio::associated_allocator_t replaces handler_alloc
2017-10-23 17:11:27 -07:00
Vinnie Falco d0d4e0a740 http write returns success on connection close (API Change):
fix #767

The write family of HTTP stream algorithms no longer returns
error::end_of_stream when the message indicates that the connection
should be closed.

Actions Required:

* Add code to servers to close the connection after successfully
  writing a message where `message::keep_alive()` would return `false`.
2017-10-22 07:03:04 -07:00
Vinnie Falco 2399b610e3 Clear previous message fields in parser
fix #818
2017-10-16 12:09:41 -07:00
Vinnie Falco 1e412715b1 Use unit-test subtree 2017-10-15 09:00:07 -07:00
Vinnie Falco 6ca2ef8449 Add missing case in error test 2017-10-10 08:17:23 -07:00
Peter Jankuliak 5a7b8b23db Fix writing headers into std::ostream 2017-09-21 16:08:19 -07:00
Vinnie Falco 06fb2b9dfc buffers_cat replaces buffer_cat (API Change):
fix #773

* buffer_cat is renamed to buffers_cat
* buffer_cat_view is renamed to buffers_cat_view

Actions Required:

* Use buffers_cat instead of buffer_cat
* Use buffers_cat_view instead of buffer_cat_view
2017-09-15 12:52:59 -07:00
Vinnie Falco e94a65b04a buffers_prefix replaces buffer_prefix (API Change)
fix #773

* buffer_prefix is renamed to buffers_prefix
* buffer_prefix_view is renamed to buffers_prefix_view

Actions Required:

* Use buffers_prefix instead of buffer_prefix
* Use buffers_prefix_view instead of buffer_prefix_view
2017-09-15 12:52:58 -07:00
Vinnie Falco 795da80859 buffers_suffix replaces consuming_buffers (API Change):
fix #770

* consuming_buffers is renamed to buffers_suffix

Actions Required:

* Use buffers_suffix instead of consuming_buffers
2017-09-15 12:52:45 -07:00
Vinnie Falco 38e28966ea message::version is a member function (API Change):
fix #778

* The version data member is replaced with accessor
  member functions.

Actions Required:

* Call member function message::version instead of accessing
  the version member at call sites.
2017-09-12 17:13:02 -07:00
Vinnie Falco 54fe7cacf7 message::body is a member function (API Change):
fix #778

* The body data member is replaced with accessor
  member functions.

Actions Required:

* Call member function message::body instead of accessing
  the data member at call sites.
2017-09-12 17:12:12 -07:00
Vinnie Falco 0007afdaf2 Fix handler signature in async_read_header 2017-09-09 06:39:49 -07:00
Vinnie Falco 49d9d47a0b HTTP reads and writes return bytes transferred (API Change):
* HTTP read and write operations now return the
  number of bytes transferred to or from the stream.

Actions Required:

* Modify HTTP read and/or write completion handlers to receive
  the extra std::size_t bytes_transferred parameter.
2017-09-03 20:37:28 -07:00
Vinnie Falco 463accffd1 Refactor test::stream 2017-08-23 14:34:13 -07:00
Vinnie Falco 2c73eeef7c Use test::stream 2017-08-16 18:26:48 -07:00
Vinnie Falco 76feb4afd4 Fix for basic_parser::skip(true) and docs
fix #742
2017-08-15 07:00:56 -07:00
Vinnie Falco a56b390638 Tidy up Jamfile and tests 2017-08-10 18:32:21 -07:00
Vinnie Falco cf8182794a Boost test matrix fixes 2017-08-08 11:11:31 -07:00
Vinnie Falco 387d68f336 Reorder define test macro params 2017-08-04 19:02:12 -07:00
Vinnie Falco 2567f49fb5 Rename test macros 2017-08-04 19:02:12 -07:00