Commit Graph

1309 Commits

Author SHA1 Message Date
Vinnie Falco
dd64bf1c18 Update release notes 2019-11-09 03:02:29 -08:00
AeroStun
d895906bcc
Refactor zlib tests and fix typo:
close #1744

* Fixed typo in enum name
* Added missing zlib error enumerator
* Marked caveat in zlib impl to avoid future confusion
* Created Compressor/Decompressor abstractions in Beast.zlib tests
* Applied abstractions on Beast.zlib tests
* Workaround Travis-CI' 10min silence timeout
* Add test for Beast.zlib's need_dict error
* Avoid breaking user-code dependant on deprecated enumerator interface

Signed-off-by: AeroStun <24841307+AeroStun@users.noreply.github.com>
2019-11-02 08:29:30 -07:00
Cristian Morales Vega
26a156e300 Fix async_close error code when async_read times out
close #1754
2019-11-02 08:26:23 -07:00
Roel Standaert
dcc30bcc40 https_get example sends the Host header:
close #1751

If you try the https_get example with the Server header, servers will
respond with 400 Bad Request. This example works as it should when it
uses the Host header.
2019-11-02 08:26:06 -07:00
Vinnie Falco
32bbd38387 Support Concepts for completion token params 2019-10-31 06:47:22 -07:00
Vinnie Falco
9f468ec1c1 Use automatically deduced return types for all async operations:
C++14 or later is required to support completion tokens that use
per-operation return type deduction. For C++11, a completion
token's async_result specialisation must still provide the nested
typedef `return_type`.
2019-10-31 06:47:22 -07:00
Vinnie Falco
d64e5f718c Add basic_stream::rebind_executor 2019-10-31 06:26:12 -07:00
Vinnie Falco
7cc8759261 Async init-fns use the executor's default token 2019-10-31 05:47:05 -07:00
Peter Jankuliak
1abe92f524 Fix leftovers in basic_parser corner case:
fix #1734, close #1736

buf_.get() has size `buf_len_`, but only `size` number of octets in that
buffer is valid.
2019-10-18 05:30:29 -07:00
Vinnie Falco
cee64b5223
Set version to 273 2019-10-15 15:48:51 -07:00
Vinnie Falco
bafce23853 Squelch spurious websocket timer assert 2019-10-09 12:00:22 -07:00
AeroStun
da3b5a664c Fixed null pointer ASAN error introduced in commit d41b7c23
Signed-off-by: AeroStun <24841307+AeroStun@users.noreply.github.com>
2019-10-07 12:47:15 -07:00
Vinnie Falco
7dbb3bd417 Add BEAST_THROWS 2019-10-06 15:15:54 -07:00
Vinnie Falco
5521b91d8c Tidy up cmake files and examples 2019-10-06 08:04:22 -07:00
Vinnie Falco
1261e7773f
Set version to 270 2019-10-04 18:58:03 -07:00
Vinnie Falco
0f932d589b Silence unused variables 2019-10-04 18:57:48 -07:00
Vinnie Falco
f3118b75de Fix /permissive- missing include
fix #1673
2019-09-27 06:46:02 -07:00
Vinnie Falco
ec81771fdd root_certificates.hpp is not for production
fix #1702
2019-09-13 09:03:35 -07:00
Vinnie Falco
c5d8c7b64c Multiple I/O of the same type is not supported
fix #1682
2019-08-29 10:55:47 -07:00
Mike Ellery
e681f9d212 Add default dtors to satisfy -Wnon-virtual-dtor
close #1664
2019-08-29 10:52:07 -07:00
Xiaofeng Wang
6eb55b21da cmake: check policy first
Fix unkown policy error with higher version cmake, e.g. 3.11.4

Example of error:
> Policy "CMP0074" is not known to this version of CMake.
2019-08-28 16:02:32 -07:00
Vinnie Falco
db2f0052ff basic_stream dtor cannot throw
fix #1688
2019-08-28 16:02:31 -07:00
Aurelien Chartier
70f232f6dd Fix signed/unsigned mismatch in file_stdio::seek
fix #1687
2019-08-28 16:02:31 -07:00
Vinnie Falco
0c7fbc74f0 Add package for Travis config 2019-08-28 16:02:31 -07:00
Vinnie Falco
52657ca5a1 Fix some missing deduced return types in the docs 2019-08-12 09:48:41 -07:00
Vinnie Falco
9f77867f0a Fix outgoing websocket message compression
fix #1666
2019-07-29 10:35:41 -07:00
Damian Jarek
373642886a Workaround for miscompilation in MSVC 14.2
`insert()` erroneously produces the string "12__343" in
Release mode on MSVC 14.2.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-07-08 20:37:42 +02:00
Damian Jarek
dc6602b5d3 Fix header-only compilation errors in some configurations
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-07-08 20:28:58 +02:00
Damian Jarek
0b04c82e2b Fix unused variable warning in multi_buffer
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-07-08 20:28:58 +02:00
Damian Jarek
261193fc9c Remove unused functions in impl/static_string.hpp
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-07-08 20:28:58 +02:00
Damian Jarek
c1565e1ff7 Fix missing initializer warning in basic_fields
clang complains about missing initializer (even though the field was
properly initialized by the default constructor).

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-07-08 20:28:58 +02:00
Damian Jarek
2c2ac8027c Fix unused variable warnings in tests
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-07-08 20:28:58 +02:00
Damian Jarek
63ef7f65bc Handle overflow in max size calculation in basic_dynamic_body
fix #1581

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-07-08 20:28:49 +02:00
Vinnie Falco
67452b23ff Update documentation 2019-07-07 12:29:56 -07:00
Vinnie Falco
89c922e02b Fix deallocate in multi_buffer 2019-07-03 17:21:19 -07:00
Vinnie Falco
9e0564044f Tidy up buffers_range 2019-07-01 12:49:03 -07:00
Vinnie Falco
ce1c6d3222 Fix multi_buffer allocation alignment 2019-07-01 12:49:03 -07:00
Vinnie Falco
d5cd3e829b Don't over-allocate in http::basic_fields 2019-07-01 12:49:03 -07:00
Damian Jarek
5f0939e771 Simplify websocket::detail::prng:
- Use a regular function pointer for dynamic dispatch.
- Remove `prng::ref` - it did not benefit the default case
  (TLS avaialable) and actually made the no-TLS case slower, because
  the time spent in the generator is dominated by mutex locking.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-07-01 12:49:01 -07:00
Damian Jarek
a7e932b13c
Remove redundant includes in websocket
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-07-01 19:43:43 +02:00
Damian Jarek
a5a28c3b7d
Fix UB in websocket read tests
An object returned from a function is not guaranteed not to be copied
in C++14 or earlier, using `initializer_list` removes the reliance on
RVO to work.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-06-25 20:00:33 +02:00
Damian Jarek
fea681b459
Deduplicate websocket::read_size_hint definition
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-06-25 04:21:52 +02:00
Damian Jarek
9847fd6e69 Remove redundant includes in core
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2019-06-24 11:07:41 -07:00
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
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