Commit Graph

98 Commits

Author SHA1 Message Date
Damian Jarek
2eedbfedfc
Add b2 features for compile-time options used in testing:
- `boost.beast.allow-deprecated=on` disables deprecated features.
- `boost.beast.separate-compilation=on` enables separate compilation.
- Add CI matrix items to check header-only, no-deprecated build.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-05-27 20:18:20 +02:00
Vinnie Falco
61fcd9ef6f Refactor Jamfiles to work with release layout 2019-03-24 09:18:02 -07:00
Damian Jarek
222dcf7b18 Jamfile cleanup:
- Don't set the global link settings (`<link>`) to avoid dependency
ordering issues in the future.
- Allow the user to decide on the link settings for dependencies
(filesystem/coroutine).
- Make dependencies in examples explicit.
- Remove dependency of examples on Boost.Filesystem (was not used there).
- Deduplicate build settings.
- Speed up test compilation by avoiding rebuilding of main test file.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-03-21 17:23:49 +01:00
Damian Jarek
05f3f8a5ce Remove the need for OpenSSL in examples that don't use it
close #1524

It is now possible to compile examples without OpenSSL. Examples that
do require OpenSSL will be omitted.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-03-19 06:59:55 -07:00
Vinnie Falco
9d27f2659f Optimize for size on buffers_cat preconditions:
When BOOST_BEAST_TESTS is not defined, violations of
buffers_cat preconditions will assert instead of throwing
exceptions. This reduces the size of the emitted code
and improves performance.
2018-12-19 20:59:20 -08:00
Vinnie Falco
cf06a8dd6a Adjust CI scripts for superproject changes 2018-12-19 20:59:19 -08:00
Damian Jarek
9816d61f38 Improve compilation of tests for continuous integration:
fix #1293

* Build ASIO's non-template entities into a static library
  to reduce the compiler's memory usage during test compilation.

* Retry as single-threaded build after the first build failure.
2018-11-20 18:07:33 -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
Vinnie Falco
d8a0200929 Remove cxx11_sfinae_expr build requirement from tests 2017-10-27 17:03:44 -07:00
Vinnie Falco
4927fa42d7 More Jamfile compiler requirements for tests 2017-10-25 11:45:40 -07:00
Vinnie Falco
e832baf93f Check compiler feature in Jamfile 2017-10-16 09:16:26 -07:00
Daniel James
66b07798e6 Use unique names for Jam projects 2017-08-01 11:31:50 -07:00
Vinnie Falco
b0d7bc2e86 Add bench-zlib 2017-07-31 19:02:47 -07:00
Vinnie Falco
df9ec6c7f3 Move bench/ to test/ 2017-07-31 19:02:46 -07:00
Vinnie Falco
809e822789 Refactor test build scripts 2017-07-29 00:26:05 -07:00
Vinnie Falco
698884d8bb Move benchmarks to bench/ 2017-07-28 18:55:32 -07:00
Vinnie Falco
59f7819cf6 Refactor tests Jamfile 2017-07-26 11:46:01 -07:00
Vinnie Falco
8578f3cf76 Update copyrights 2017-07-24 09:42:51 -07:00
Vinnie Falco
7139dd639a Boost prep 2017-07-23 17:34:13 -07:00
Vinnie Falco
bd5ab6ffd0 Add wstest benchmark tool 2017-07-20 08:15:32 -07:00
Vinnie Falco
beead1a297 Split common tests to a new project 2017-07-20 08:15:29 -07:00
Vinnie Falco
67e3e801cb Exemplars are compiled code
fix #455
2017-07-20 08:15:28 -07:00
Vinnie Falco
65b127d2e6 Tidy up Jamfiles 2017-07-20 08:15:28 -07:00
Vinnie Falco
7b8149cfd4 Move benchmarks to a separate project 2017-07-20 08:15:27 -07:00
Vinnie Falco
9c4b3ed2a7 Only build and run tests in variant=coverage 2017-07-20 08:15:27 -07:00
Vinnie Falco
d5f15976e7 Tidy up test build scripts and projects 2017-07-20 08:15:27 -07:00
Vinnie Falco
79eb97fbd6 Add server-framework tests 2017-07-20 08:15:27 -07:00
Vinnie Falco
fd9a13b11f New server-framework, full featured server example:
A new server framework is introduced, allowing users to
quickly get off the ground. Example servers are refactored
to use the common framework.
2017-07-20 08:15:26 -07:00
Vinnie Falco
b5306a5712 String comparisons are public interfaces 2017-07-20 08:15:26 -07:00
Vinnie Falco
510092d34b Reorganize examples:
* The examples/ directory is renamed to example/

* Each program is in its own directory with its own build scripts
2017-07-20 08:15:26 -07:00
Vinnie Falco
7712ca09b2 Add string_view_body 2017-07-20 08:12:20 -07:00
Vinnie Falco
a49c096042 read_size replaces read_size_helper:
* detail::read_size_helper is removed

* public function read_size helps determine the optimum
  size for calls to a DynamicBuffer's prepare function.

* special case for Asio types which don't conform to
  the concept but have their own helper function.
2017-07-20 08:12:20 -07:00
Vinnie Falco
0d70d90b75 Add string_param
fix #451
2017-07-20 08:12:19 -07:00
Vinnie Falco
5149cf8495 Add drain_buffer class
fix #457
2017-07-20 08:12:19 -07:00
Vinnie Falco
44995bf071 Documentation work 2017-07-20 08:12:19 -07:00
Vinnie Falco
74c26a8869 DynamicBuffer benchmarks
fix #441
2017-07-20 08:12:19 -07:00
Vinnie Falco
cff5be3837 Documentation work 2017-07-20 08:12:19 -07:00
Vinnie Falco
67df48daa6 Documentation work 2017-07-20 08:12:18 -07:00
Vinnie Falco
1c063f5bf6 Add field enumeration 2017-07-20 08:12:18 -07:00
Vinnie Falco
4b866cea36 Documentation work 2017-07-20 08:12:18 -07:00
Vinnie Falco
88600beab0 Consolidate parsers to parser.hpp
fix #405
2017-07-20 08:12:18 -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
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
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
68a0f3af4f Rename prepare_buffer(s) to buffer_prefix (API Change) 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
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