218 Commits
Author SHA1 Message Date
Vinnie Falco b46953f1bd Use async_op_base:
Composed operation implementations use async_op_base and
stable_async_op_base, to eliminate redundant boilerplate.
2019-01-09 09:54:42 -08:00
Vinnie Falco 9e44ae7be5 Refactor async_op_base:
* Renamed to async_op_base (was operation_base)
* Executor1 is explicit
* Add stable_async_op_base refinement
2019-01-09 09:54:15 -08:00
Vinnie Falco c4f4087888 Add buffers_range_ref (replaces reference_wrapper parameter) 2018-12-19 21:51:49 -08:00
Vinnie Falco 9ccd8a754a HTTP tidying 2018-12-19 21:51:49 -08:00
Vinnie Falco 35e4f321bc Refactor HTTP operations (API Change):
* Revise stream algorithm javadocs

* HTTP stream algorithms now use beast::read and
  beast::async_read with a custom completion condition.

API Changes:

* HTTP stream algorithms return the number of bytes transferred
  from the stream. Previously, they returned the number of bytes
  consumed by the parser.

Actions Required:

* Callers depending on the return value of http::read or
  http::async_read overloads should adjust the usage of
  the returned value as needed.
2018-12-06 15:50:26 -08:00
Vinnie Falco b3a8e6edb5 Tidy up calls to placement new 2018-12-02 19:48:42 -08:00
Vinnie Falco f995fd41a3 net is a namespace alias for boost::asio:
The namespace alias beast::net replaces boost::asio in all code
and documentation.
2018-12-02 17:51:43 -08:00
Vinnie Falco 2b16c50321 http::async_read returns the right byte count on error
fix #1223
2018-11-27 10:09:19 -08:00
Damian Jarek 836042fd24 Fix test::stream async_result transformation:
close #1322

async initiating functions must return init.result.get(). Returning the
result of post caused a compilation failure for custom completion tokens.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2018-11-26 16:02:44 -08:00
Vinnie Falco 2cdaf51119 http::message is not-a boost::empty_value
fix #1306
2018-11-26 15:30:48 -08:00
Damian Jarek c0e5d1bd76 Use mp11::integer_sequence
Close #1317

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2018-11-26 15:30:48 -08:00
Vinnie Falco 15dd535c24 Use bind_front_handler:
The implementation uses bind_front_handler to reduce the
resources consumed when instantiating templates during
compilation.
2018-11-21 12:47:38 -08:00
Damian Jarek 5ade2a5050 Tidying:
fix #1311, fix #1310, fix #1309

* Remove unused include directive
* Remove redundant static_assert
* Remove redundant use of bind_handler

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2018-11-20 18:07:35 -08:00
Vinnie Falco 071cab92d5 Add buffers_range 2018-11-12 06:39:36 -08:00
Vinnie Falco 450964b78f Squashed 'doc/docca/' changes from 1bfc5ede..df9bd956
df9bd956 Add deduced alias
220ded9a Add see-below alias

git-subtree-dir: doc/docca
git-subtree-split: df9bd956e2480467447c80ffae3b44b3c0b0756a
2018-11-11 22:25:56 -08:00
Damian Jarek 1cdc1e3181 Add missing include in http/read.ipp
Fixes a compilation error that occurred when using
BOOST_ASIO_SEPARATE_COMPILATION.

Resolves: #1286

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2018-11-03 19:30:15 -07:00
Vinnie Falco 65434a0cba Partial support for BOOST_NO_EXCEPTIONS:
Some stream operations are modified to use a
helper function which supports BOOST_NO_EXCEPTIONS.
2018-11-01 21:10:54 -07:00
compmaniak 955b7b31a5 Fix parsing of out-of-bounds hex values
fix #1267
2018-10-20 08:40:27 -07:00
Vinnie Falco 29e9ad5370 basic_fields uses intrusive base hooks:
fix #1270

basic_fields::value_type uses base hooks instead of member hooks,
otherwise MSVC can sometimes produce undefined behavior when
attempting to recover the base class from a data member in
certain build configurations.
2018-10-19 17:42:30 -07:00
Domen Vrankar 806979e37b Add BOOST_BEAST_USE_STD_STRING_VIEW:
fix #1133, fix #1241

When the macro BOOST_BEAST_USE_STD_STRING_VIEW is defined,
Beast will use std::string_view instead of boost::string_view.

The name boost::beast::string_view is a type alias for the
chosen view type.
2018-10-07 10:38:36 -07:00
luz.paz f3212eba48 Fix some typos:
fix #1255

Found via `codespell -q 3 -L uint,te,tim --skip="./test/extern/zlib*,./example/http/client/crawl*"`
2018-10-07 10:35:12 -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
compmaniak 802390886d Fix parse_dec algorithm
fix #1211
2018-07-29 17:05:11 -07:00
Glen Fernandes 8ed039200d Use the exchange() idiom in move constructors
fix #1203
2018-07-23 09:19:16 -07:00
Vinnie Falco 92d34b9e3b Use static_cast instead
fix #1163
2018-07-15 09:11:15 -07:00
Vinnie Falco 37c90220d0 Fix Fields, FieldsWriter concept docs 2018-06-18 08:42:24 -07:00
Vinnie Falco f5def127d8 Tidy up test::stream javadocs 2018-05-29 15:32:01 -07:00
Vinnie Falco 5b8eb1d87d Fix http::parser constructor javadoc 2018-05-28 11:23:37 -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 07aead170a Add is_mutable_body_writer metafunction 2018-05-04 19:34:05 -07:00
Vinnie Falco 416f84bc63 Remove deprecated Body reader and writer ctor signatures 2018-05-04 12:47:27 -07:00
Vinnie Falco 73bc28aaa2 Remove deprecated serializer::reader_impl() 2018-05-03 19:42:36 -07:00
Vinnie Falco c592782a1b Simplify some type trait expressions
fix #466
2018-04-26 17:30:46 -07:00
Vinnie Falco 42ac536f9b Refactor HTTP write_op implementation
fix #764
2018-04-25 14:07:19 -07:00
Vinnie Falco 3c3f4fc52b Revert "Tidy up a warning"
This reverts commit 90d2df3be3.
2018-04-10 09:09:49 -07:00
Vinnie Falco 86342dd72b Use executor_work_guard in composed operations:
fix #1076

As per Asio and Networking TS requirements, composed operations must
maintain an object of type executor_work_guard for the executor associated
with the I/O object, for the lifetime of the asynchronous operation.

This is in addition to the requirement for maintaining an object of type
executor_work_guard for the executor associated with the handler.
2018-04-10 08:03:04 -07:00
Vinnie Falco 12cc10f8bb Revert "Tidy up calls to post()"
This reverts commit 5eaa2be85e.
2018-03-22 20:13:39 -07:00
Vinnie Falco 90d2df3be3 Tidy up a warning 2018-03-11 14:22:50 -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 5eaa2be85e Tidy up calls to post() 2018-03-04 13:19:17 -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
Vinnie Falco 073b53e448 Fix handler parameter javadocs 2018-02-28 15:04:54 -08:00
Vinnie Falco dfc5a2ff67 Add move-only handler tests 2018-02-28 15:04:54 -08:00
Vinnie Falco 5d5e58c5b4 Some basic_fields operations now give the strong exception guarantee 2018-02-26 17:09:47 -08:00
Vinnie Falco 9f094518bc Safe treatment of zero-length string arguments in basic_fields:
This fixes a broken memcpy precondition when empty strings are
passed as arguments to basic_fields member functions.
2018-02-26 17:09:20 -08:00
Vinnie Falco 8dcc6162c1 Tidy up end_of_stream javadoc
fix #1023
2018-02-21 08:45:08 -08:00
Benjamin Roland Buch b7750de15f Fix fallthrough warnings
fix #1019
2018-02-16 10:51:28 -08:00
Vinnie Falco d855bdefd8 Type check completion handlers
fix #988
2018-01-26 08:58:19 -08:00
Peter Jankuliak 4fb535ece6 Fix iterator version of basic_fields::erase
fix #994
2018-01-25 06:02:43 -08:00