Commit Graph

1930 Commits

Author SHA1 Message Date
Damian Jarek
7e8af58307 Move detail::base64 helpers to tests
These functions were only used in tests.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-06-24 11:07:41 -07:00
Damian Jarek
1635df0e11 Simplify generation of sec-websocket-key
The result of `g()` is a random number, therefore it's not necessary
to care about endianness in this case.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-06-24 11:07:41 -07:00
Damian Jarek
b8b04f8f39 Cleanup transitive includes in beast/core/detail/type_traits.hpp
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-06-24 11:07:41 -07:00
Damian Jarek
153408eb5b
More split compilation in websocket/detail/mask.hpp
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-06-23 16:58:15 +02:00
Damian Jarek
1a720c8354
Qualify calls to beast::iequals in basic_parser.ipp
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-06-23 16:58:15 +02:00
Damian Jarek
50ce5f7396
More split compilation in rfc7230.hpp
* Moved `find` and `exists` to the `ipp` file.
* Fixed missing include file in MSVC.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-06-23 09:50:16 +02:00
Damian Jarek
048fe16fa3
Set version to 259
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-06-19 11:37:25 -07:00
Vinnie Falco
61721544f0 Style tidying 2019-06-19 11:37:20 -07:00
Damian Jarek
214fa12f21
Use beast::read_size in detail::read
This allows using the read size hint and deduplicates a fairly
complicated piece of code.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-06-19 17:53:36 +02:00
Damian Jarek
8d5bd286d7
Replace uses of net::spawn with asio::spawn
`asio::spawn` is an extension, which is not part of
the Networking TS, so the `net` alias is not appropriate in this case.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-06-19 17:53:35 +02:00
Damian Jarek
f10dc38ae6
Replace uses of net::coroutine with asio::coroutine
`asio::coroutine` is an extension, which is not part of
the Networking TS, so the `net` alias is not appropriate in this case.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-06-19 17:53:35 +02:00
Damian Jarek
a0d5baf22a
Improve performance of http::string_to_verb
`operator==` performs better than the hand-written comparison routine.

fix #1636

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-06-19 17:53:35 +02:00
Damian Jarek
ab55c4d21e
Fix coverage collection in AzP
https://github.com/boostorg/build/pull/449

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-06-19 17:53:35 +02:00
Damian Jarek
da61b4e52c
Move char_buffer into a separate file
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-06-19 17:53:34 +02:00
Damian Jarek
a7ae580568
Remove unused includes from test::stream
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-06-19 17:53:34 +02:00
Damian Jarek
edca7dd18e
Remove redundant use of asio::coroutine in flat_stream
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-06-19 17:53:34 +02:00
Damian Jarek
a7ff1a41e7
Remove redundant instation of static_string in websocket
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-06-19 17:53:33 +02:00
Damian Jarek
d5f5f1467f
Enable split compilation in http::basic_fields
Moved functions,that are independent of template argument, into
an *.ipp file.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-06-19 17:53:33 +02:00
Damian Jarek
2bc521d6ab
Add gcc-9 to AzP CI test matrix
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-06-04 15:31:18 +02:00
Damian Jarek
833243d948
Remove the use of static_string from http::fields
The `temporary_buffer<A>` class template replaces the use of
`static_string` in `http::fields`, simplifying `set_chunked_impl` and
`set_keep_alive_impl`.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-06-04 15:31:18 +02:00
Damian Jarek
76842d637f
Reduce the number of instantiations of filter_token_list
Not using lambdas in this case reduced the number of instantiations of
the algorithm by a factor of 4x at no (observable) runtime cost.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-06-03 18:05:52 +02:00
Damian Jarek
6af4c01e56
Set version to 258
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-06-01 18:16:27 +02:00
Konstantin Podsvirov
56b5f8043f
Clean up typo in chat websocket javascript client
It so happened that the code works, because both variables exist,
but the code was not clean.

close #1620
2019-06-01 18:15:25 +02:00
Damian Jarek
fce080f1a8
Add VS 2019 AzP CI matrix item
The VS 2019 image now includes vcpkg by default, which enables adding
it to CI.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-05-31 20:11:38 +02:00
Damian Jarek
a094e7d891
Remove redundant use of yield_to in parser tests
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-05-31 02:04:36 +02:00
Damian Jarek
d52b4e4bd3
Fix clang inititalization warning in websocket
Clang suggests using double braces when initializing a single subobject
of an aggregate.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-05-31 02:04:36 +02:00
Damian Jarek
ad66be6eb7
Fix separate compilation in CI
`optional` adds a "null" default feature value, effectively defaulting
to `off`, instead of `on`.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-05-31 02:04:35 +02:00
Damian Jarek
52668cf730
Set version to 257
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-05-29 21:14:18 +02:00
Vinnie Falco
e9781b225e
Fix flat_buffer copy members
fix #1621
2019-05-29 21:14:14 +02:00
Damian Jarek
8198571555
Use if statement in basic_stream:
An `if` statement is cheaper to instantiate without additional runtime
cost when optimizations are enabled.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-05-27 22:15:49 +02:00
Damian Jarek
894ab45052
Remove experimental/unit_test/thread.hpp
The file has been unused in Beast for a few releases.

Actions required:
- Copy the `thread` class into your project.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-05-27 22:13:13 +02:00
Damian Jarek
d0b0ab8961
Remove redundant dependencies in http/server/fast example
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-05-27 20:18:21 +02:00
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
Damian Jarek
15232fcf69
Set version to 256
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-05-20 15:34:22 +02:00
Vinnie Falco
be460675bc
Preserve operation_aborted on partial message 2019-05-20 15:34:22 +02:00
Filip Matzner
1501962b92
Use steady_timer type
close #1606
2019-05-20 15:34:21 +02:00
Vinnie Falco
363d5c36d3
Don't pessimize-move 2019-05-20 15:34:21 +02:00
Damian Jarek
85adb6ca2f
Fix buffers_cat iterator tests
The default constructed iterators tests were never run.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-05-20 15:34:20 +02:00
Damian Jarek
3fa468f840
Add 1-element specialization for buffers_cat
`buffers_cat` now supports 1 or more buffers sequences.

Close #1280

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-05-20 15:33:43 +02:00
Damian Jarek
9909fada29
allocator_traits::construct is used for user-defined types:
It should only be called when constructing a user-provided type.

Close #1332

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-05-20 15:29:21 +02:00
Konstantin Podsvirov
e5bad9cbc2
Make chat websocket javascript client more user friendly
Close #1611
2019-05-19 22:32:44 +02:00
Damian Jarek
86176786c3
Expand CI matrix using Azure Pipelines:
* Allow setting a seed in websocket prng to workaround a valgrind bug
  in Xenial.
* Coverage collection in Azp.
* Fixup blacklists to avoid zlib bugs.
* Use native b2 features for sanitizers and valgrind.
* Expanded Windows build matrix.
* Add additional clang (with libc++) builds.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-05-19 22:32:44 +02:00
Damian Jarek
e98fc22bec
Remove redundant template in service_base
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-05-19 22:32:43 +02:00
Damian Jarek
0f77bd7149
Remove the use of bind_executor in basic_stream:
Use the executor hook instead of `bind_executor` to avoid template
instantiations.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-05-19 22:32:43 +02:00
Damian Jarek
dcf3db7f83
Remove redundant use of static_string
This avoids an instantiation and copy of the data when adding the Server
header field.

Close #1613

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-05-19 22:32:43 +02:00
Damian Jarek
cefb744794
Remove uses of deprecated methods in websocket tests
This enables tests to be built without BOOST_BEAST_ALLOW_DEPRECATED.

Close #1612

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-05-19 22:32:43 +02:00
Damian Jarek
c254b4fcfb
Remove uses of the deprecated buffers function
Fix: 1607
Close: 1608

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-05-19 22:32:37 +02:00
Vinnie Falco
d1dabebd83
Set version to 255 2019-05-04 18:48:14 -07:00
Vinnie Falco
77f3bb0764 Fix moved-from executor in idle ping timeout
fix #1599
2019-05-04 18:47:44 -07:00
Vinnie Falco
6be11913a0 Add idle ping suspend test
close #1599
2019-05-04 18:47:37 -07:00