1467 Commits
Author SHA1 Message Date
Vinnie Falco 02d5aedc29 Refactor HTTP serialization and parsing (API Change):
fix #404

Parsing and serialization interfaces have been fine tuned and unified.

For parsing these stream operations are defined:

* read
* read_header
* read_some
* async_read
* async_read_header
* async_read_some

For serialization these stream operations are defined:

* write
* write_header
* write_some
* async_write
* async_write_header
* async_write_some
2017-07-20 08:12:17 -07:00
Vinnie Falco b76eb2864e buffer_size overload for basic_multi_buffer::const_buffers_type 2017-07-20 08:12:17 -07:00
Vinnie Falco 7435d3c65f Disable operator<< for buffer_body
fix #363
2017-07-20 08:12:17 -07:00
Vinnie Falco e5cfe9c11f Refactor treatment of status code and obsolete reason (API Change):
fix #398

A new enum status is added for the status code.

The function obsolete_reason returns default reason phrasing.

If a response has an empty reason, the serializer will
automatically insert the default reason phrase for the
status code.
2017-07-20 08:12:17 -07:00
Vinnie Falco f7211da154 Refactor treatment of request-method (API Change):
fix #397

method enum class is added to represent all known request methods.
Functions are provided to convert from strings to and from the method
enumeration.

The fields container is modified to also work with the enum.
2017-07-20 08:12:17 -07:00
Vinnie Falco cd2363e951 Set version to 46 2017-07-20 08:12:17 -07:00
Vinnie Falco 0056c97d94 Documentation work 2017-07-20 08:12:17 -07:00
Vinnie Falco 060f4a007b Refactor serialization algorithms:
serializer interface is changed to be buffer-only, no streams,
and placed in its own header file.

Operations on serializers are moved to free functions as part
of the HTTP write family of synchronous and asynchronous algorithms.
2017-07-20 08:12:17 -07:00
Vinnie Falco d0d08e81f9 Rename to make_serializer 2017-07-20 08:12:17 -07:00
Vinnie Falco 75b0571e83 Refactor type_traits (API Change):
fix #373

* concepts.hpp is renamed to type_traits.hpp

* Body reader and writer concepts are renamed
2017-07-20 08:12:17 -07:00
Vinnie Falco 3664329ea7 Refactor HTTP serialization (API Change):
A new class `serializer` is introduced to permit incremental
serialization of HTTP messages. Existing free functions are
re-implemented in terms of this new class.

* The BodyReader concept is refined to support a greater variety
of strategies for providing buffers representing the body to
the serialization algorithms.

* Added buffer_body, a new model of Body which allows the caller
to provide a series of owned buffers using their own serialization
loop.

* Added empty_body, a model of Body which is for serialization only,
to represent HTTP messages with no content body.

* Removed overloads of write and async_write which send only
the HTTP header.

* Removed public interfaces for performing low-level chunk encoding.
2017-07-20 08:12:17 -07:00
Vinnie Falco b9bdb1bbbc Remove HTTP header aliases (API Change):
fix #382

* request_header and response_header are removed
2017-07-20 08:12:17 -07:00
Vinnie Falco 9a6d4f153b Set version to 45 2017-07-20 08:12:17 -07:00
Vinnie Falco 4ed6a7fe21 Disable reverse_iterator buffer_view test 2017-07-20 08:12:17 -07:00
Vinnie Falco 056bf5ff99 buffer_view skips empty buffer sequences 2017-07-20 08:12:17 -07:00
Vinnie Falco c6cddc83c4 Fix header::reason 2017-07-20 08:12:17 -07:00
Vinnie Falco f0349efddc Workaround for boost::asio::basic_streambuf type check 2017-07-20 08:12:17 -07:00
Vinnie Falco e58fce380c Set version to 44 2017-07-20 08:12:17 -07:00
Vinnie Falco 2b18193f7d Make buffers_adapter meet requirements
fix #386
2017-07-20 08:12:17 -07:00
Vinnie Falco 7c47668cbb Tidy up is_dynamic_buffer traits test 2017-07-20 08:12:17 -07:00
Vinnie Falco 600f6da5a3 Fix async return values in docs 2017-07-20 08:12:17 -07:00
Vinnie Falco 24fd5ec8af Use BOOST_STATIC_ASSERT
fix #380
2017-07-20 08:12:17 -07:00
Vinnie Falco 02033c7412 Tidy up and make get_lowest_layer public
fix #379
2017-07-20 08:12:17 -07:00
Vinnie Falco e86ca5d66b Require Boost 1.58 or later 2017-07-20 08:12:17 -07:00
Vinnie Falco 929174d4d8 Tidy up read_size_helper and dynamic buffers
fix #376
2017-07-20 08:12:17 -07:00
Vinnie Falco 3543b4b913 Use BOOST_THROW_EXCEPTION
fix #370
2017-07-20 08:12:17 -07:00
Vinnie Falco 1c1e0c8ae0 Set version to 43 2017-07-20 08:12:17 -07:00
Vinnie Falco 39697ea37f Additional constructors for consuming_buffers 2017-07-20 08:12:17 -07:00
Vinnie Falco b76d19c3cb Tidy up buffer_prefix overloads and test 2017-07-20 08:12:17 -07:00
Vinnie Falco 000349ba23 Fix strict aliasing warnings in buffers_view 2017-07-20 08:12:17 -07:00
Vinnie Falco e6ef8261f6 Set version to 42 2017-07-20 08:12:17 -07:00
Vinnie Falco 9e16e24ec4 Make buffers_view a public interface 2017-07-20 08:12:17 -07:00
Vinnie Falco 4332844d89 Fix javadoc typo 2017-07-20 08:12:17 -07:00
Vinnie Falco 11eaead294 Set version to v41 2017-07-20 08:12:17 -07:00
Vinnie Falco 71e4fbe428 Remove handler helpers, tidy up hook invocations (API Change) 2017-07-20 08:12:17 -07:00
Vinnie Falco 68a0f3af4f Rename prepare_buffer(s) to buffer_prefix (API Change) 2017-07-20 08:12:17 -07:00
Vinnie Falco 83ea2308a2 Tidy up websocket::close_code enum and constructors
fix #359
2017-07-20 08:12:17 -07:00
Vinnie Falco afde7508f1 Tidy up formal parameter names
fix #361
2017-07-20 08:12:17 -07:00
Vinnie Falco 51f11f0902 Concept revision and documentation (API Change):
The concept type traits are renamed for consistency,
and consolidated into a single header file <beast/core/type_traits.hpp>

A new section, Core Concepts, is added to the documentation describing all
of the core utility classes and functions. This also includes a complete
explanation and sample program describing how to write asynchronous initiation
functions and their associated composed operations.
2017-07-20 08:12:16 -07:00
Vinnie Falco aa8a0a2a4b Replace asynchronous helper macros with template aliases (API Change) 2017-07-20 08:12:16 -07:00
Vinnie Falco 043386aeb3 Move prepare_buffers to prepare_buffer.hpp (API Change)
fix #338
2017-07-20 08:12:16 -07:00
Vinnie Falco 7d8e40537a Remove placeholders (API Change) 2017-07-20 08:12:16 -07:00
Vinnie Falco 0656c5b1f5 Return http::error::end_of_stream on HTTP read eof (API Change)
fix #350
2017-07-20 08:12:16 -07:00
Vinnie Falco 463d891e5c Set version to 40 2017-07-20 08:12:16 -07:00
Vinnie Falco 761e005fd6 Fix basic_streambuf movable trait 2017-07-20 08:12:16 -07:00
Vinnie Falco f097f401cb Consolidate get_lowest_layer in type_traits.hpp
fix #347
2017-07-20 08:12:16 -07:00
Vinnie Falco 4edd797611 Add to_static_string:
This function converts integers to their decimal
representation as a static string.

In addition, static_string::resize no longer initializes
characters if the new size is larger.
2017-07-20 08:12:16 -07:00
Vinnie Falco 8a49eed947 Set version to 39 2017-07-20 08:12:16 -07:00
Vinnie Falco 140bf5cb1d ostream workaround for gcc 4.8.4 2017-07-20 08:12:16 -07:00
Vinnie Falco 5c9e6c0fc0 Increase ostream test coverage 2017-07-20 08:12:16 -07:00