Commit Graph

1309 Commits

Author SHA1 Message Date
Vinnie Falco
ad2cdf0281 Tidy up msvc-14 workaround in multi_buffer 2018-12-19 20:59:20 -08:00
Vinnie Falco
49c5f7c30f Don't include OpenSSL for core snippets 2018-12-19 20:59:20 -08:00
Vinnie Falco
b0f86ea001 Fix Appveyor badge links 2018-12-14 05:37:41 -08:00
Vinnie Falco
e17a92f2a8 Workarounds for msvc-14 2018-12-13 19:38:44 -08:00
Vinnie Falco
f0cbf8276e Tidy up bind_handler tests 2018-12-12 19:32:22 -08:00
Vinnie Falco
2afe929bb7 Fix bind_handler, bind_front_handler:
This tidies up small corner cases and bugs with
the bind_handler and bind_front_handler wrappers:

* Legacy allocation hooks are deleted
* Fixes for bind_front_handler specializations
* Decay bound arguments first, to reduce template instantiations
* Proper moving and forwarding of bound arguments and call parameters
2018-12-12 19:32:22 -08:00
Vinnie Falco
120d5481e2 Tidy up core files 2018-12-12 19:32:22 -08:00
Vinnie Falco
d8a23776d4 Tidy up experimental files 2018-12-12 19:32:22 -08:00
Vinnie Falco
0a583a331d Add buffer_traits.hpp, buffers_type 2018-12-12 19:32:22 -08:00
Vinnie Falco
b6eb988694 saved_handler maintains a work_guard (websocket):
* Tidy up and comment asserts

* `pausation` is renamed to saved_handler

* A work guard on the handler's associated executor
  is maintained for the lifetime of the store handler.
2018-12-12 19:32:22 -08:00
Vinnie Falco
8ea282ee5e flat_static_buffer improvements (API Change):
* Revise documentation
* Specify exception safety
* Mark more functions noexcept

API Changes:

* flat_static_buffer::reset is deprecated

Actions Required:

* Replace calls to flat_static_buffer::reset with
  flat_static_buffer::clear
2018-12-12 19:32:22 -08:00
Vinnie Falco
3e695d588a static_buffer improvements:
* Revise documentation
* Specify exception safety
* Mark more functions noexcept
2018-12-12 19:32:21 -08:00
Vinnie Falco
4fec064ad8 Files return errc::bad_file_descriptor (API Change):
fix #1356

* File functions return errc::bad_file_descriptor
  instead of errc::invalid_argument.

Actions Required:

* Callers checking for errc::invalid_argument from calls to
  file APIs should check for errc::bad_file_descriptor instead.
2018-12-12 19:32:21 -08:00
Vinnie Falco
8262405064 multi_buffer improvements:
fix #1345

* Revise documentation
* Add reserve() member
* Add max_size() member
* Add shrink_to_fit() member
* Respect Allocator max_size
* Specify exception safety
2018-12-12 19:32:21 -08:00
Vinnie Falco
11c71d118f flat_buffer improvements:
fix #1345

* Revise documentation
* Add reserve() member
* Add max_size() member
* Respect Allocator max_size
* Specify exception safety
2018-12-12 19:32:21 -08:00
Damian Jarek
776462a8a4 Use a struct instead of pair in flat_stream
No need to instantiate a pair and a custom struct has better member
names.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2018-12-06 15:53:13 -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
c11682032b Crawler example clears the response before each read:
fix #1100

Unfortunately the example still seems to hang, tested
with 20 threads.
2018-12-06 15:50:24 -08:00
Brett Robinson
88eef1e9e3 Improvements to echo-op example:
close #1347

* Set SO_REUSEADDR in listener
* Use newline as the delimiter in async_read_until
* Add arg parsing and exit status to echo-op example
2018-12-03 17:08:40 -08:00
Damian Jarek
34037d538e Simplify handler_ptr:
Replace aligned_union in handler_ptr with the built-in one to reduce
the number of template instantiations and remove the reinterpret_casts
that were required.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2018-12-02 20:23:18 -08:00
Damian Jarek
587929edf6 Remove unused type_traits
close #1337

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2018-12-02 19:51:34 -08:00
Vinnie Falco
b3a8e6edb5 Tidy up calls to placement new 2018-12-02 19:48:42 -08:00
Vinnie Falco
7005f6b918 Documentation work 2018-12-02 17:52:04 -08:00
Vinnie Falco
773048c551 Simplify multi_buffer and static_buffer sequences 2018-12-02 17:52:01 -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
f18764424c Saved handlers are dispatched 2018-12-01 04:40:59 -08:00
Vinnie Falco
29cf6ce61f Dynamic buffers improvements:
fix #1305

Applies to:

    flat_buffer
    flat_static_buffer
    multi_buffer
    static_buffer

Changes:

* Revised all javadocs
* Move construction does not invalidate in some cases
* non-const data() returns a mutable buffer sequence
* Add cdata() to also return constant readable bytes
* Eligible member functions are declared noexcept
2018-11-30 13:46:56 -08:00
Brett Robinson
eb588ff82c Tidy up ssl_stream (experimental):
fix #1323, close #1328

* Fix whitespace
* Remove ssl::context pointer
* Use implicit move ctor and assignment operator
2018-11-28 13:46:40 -08:00
Vinnie Falco
49cdabca19 Add net namespace alias 2018-11-27 10:24:24 -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
8930d437b5 Enable explicit instantiation of websocket::stream:
fix #1279, close #1319

This enables users to improve compilation performance by explicitly
instantiating the stream template in another TU.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2018-11-26 18:38:09 -08:00
Damian Jarek
650ddd07c1 Tidy up test::stream:
fix #1308, close #1321

* test::stream will no longer include asio::tcp::ip transitively.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2018-11-26 16:04:00 -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
Brett Robinson
f8b3ae1186 Update ssl_stream signatures for networking changes
fix #1247, close #1323
2018-11-26 16:00:58 -08:00
Vinnie Falco
e57c74b56c
Set version to 192 2018-11-26 15:30:53 -08:00
Vinnie Falco
02fb4983f6 Fixes to timeout services (experimental) 2018-11-26 15:30:49 -08:00
Vinnie Falco
cd07e5bce8 Fix link in docs
fix #1296
2018-11-26 15:30:49 -08:00
Vinnie Falco
2cdaf51119 http::message is not-a boost::empty_value
fix #1306
2018-11-26 15:30:48 -08:00
Vinnie Falco
5bff4ed8ab Tidy up warnings and deprecated usage:
fix #1290

* BOOST_ASIO_NO_DEPRECATED=1 is now set
* Fix various warnings from the Boost regression test matrix
* Fix a bug in advanced servers when checking for a timeout
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
c0695db877 Merge master into develop 2018-11-26 15:26:51 -08:00
Vinnie Falco
320037a6bc
Set version to 189-hf1 2018-11-26 12:19:22 -08:00
Vinnie Falco
a5d5c7500a example/cppcon2018 only requires C++11 2018-11-26 12:04:35 -08:00
Vinnie Falco
cf6021a355 Fix broken doc link 2018-11-26 12:04:03 -08:00
Vinnie Falco
7b93cca28a example/cppcon2018 only requires C++11 2018-11-22 18:34:25 -08:00
Vinnie Falco
e0b3aa7745 Fix warning in is_ssl_handshake 2018-11-22 18:34:09 -08:00
Vinnie Falco
2585625459 Fix static_string uninitialized warning 2018-11-22 08:08:55 -08:00
Damian Jarek
b9eb1d75d9 Fix buffers_cat uninitialized warning
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2018-11-22 08:07:10 -08:00
Damian Jarek
13322fa4bb Use mp11 in detail::variant
Reduce compilation cost for all components dependent on variant.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2018-11-22 07:39:26 -08:00
Damian Jarek
98ff568371 Use lean_tuple in bind_handler, bind_front_handler 2018-11-21 12:47:59 -08:00
Damian Jarek
d40255b357 Use lean_tuple in buffers_cat
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2018-11-21 12:47:38 -08:00
Damian Jarek
65827558b8 Simplify some type traits:
Several type traits are simplified and optimized to
reduce compile time and memory consumption.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2018-11-21 12:47:38 -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
Vinnie Falco
d581bcc348 Add bind_front_handler:
This works similarly to bind_handler, and can help with reducing
template instantiations and compiler memory usage (since it does
not need to support placeholders).

A specialization for the most common case `void(error_code, size_t)`
is provided to minimize instantiation cost.
2018-11-21 12:47:38 -08:00
Vinnie Falco
6ffef38dc4 Fix visibility warnings in test 2018-11-20 20:51:45 -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
c18f3f0ef1 Rename to _experimental directory 2018-11-12 06:52:39 -08:00
Vinnie Falco
071cab92d5 Add buffers_range 2018-11-12 06:39:36 -08:00
Vinnie Falco
0f3696f2ec Unit test framework is experimental 2018-11-11 13:56:05 -08:00
Vinnie Falco
f997a63204 Add missing includes to convenience headers 2018-11-09 13:47:36 -08:00
Vinnie Falco
bc2f5f1426 Add CppCon2018 chat server example and video 2018-11-08 16:46:38 -08:00
Vinnie Falco
04bac8dce9 Remove extraneous strand from example
fix #1288
2018-11-03 19:30:16 -07: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
215896723f Test for gcc warning bug 2018-11-03 19:30:15 -07:00
Vinnie Falco
8962588cec Fix a spurious gcc warning 2018-11-03 18:43:21 -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
Vinnie Falco
30ca9c59d3 Fix uninitialized comparison in buffers iterator
fix #1263
2018-11-01 21:10:54 -07:00
Vinnie Falco
093af24e2b Fix warning in file tests 2018-10-28 21:19:12 -07:00
Vinnie Falco
ef0658f678 Add experimental timeout_socket:
This is a socket wrapper which has a built-in timeout feature on
reads and writes.
2018-10-28 19:43:28 -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
Vinnie Falco
ec1c8ada7a
Set version to 185 2018-10-07 18:35:53 -07:00
jarle
2b977f2770 Fix timer on websocket upgrade in examples
fix #1091, fix #1240, fix #1253
2018-10-07 10:38:36 -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
Vinnie Falco
82e87ea188 Workaround for http-server-fast and libstdc++:
This fixes a problem where libstdc++ incorrectly assumes that the
allocator used with basic_string is DefaultConstructible.

See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56437
2018-09-23 19:08:30 -07:00
Glen Fernandes
5e98c78951 Use boost::empty_value
fix #1233
2018-09-23 10:12:08 -07:00
PeterW3
4643b0565e Verify certificates in client examples:
fix #1237

HTTP client examples now verify the server's certificate
and generate an error if the certificate is invalid or
expired:

* Set certificate verify mode
* Remove duplicate root certificate
2018-09-23 10:12:08 -07:00
Boris Sergeev
a4c008907d Fix a rare case of incorrect UTF8 validation
fix #1245, fix #1249

The value used to fill the incomplete code point buffer is
changed to a character which no longer causes
utf8_checker::valid() to incorrectly return false.
2018-09-23 10:12:07 -07:00
Vinnie Falco
f32a8e2c99 Silence ubsan false positive
fix #1214
2018-08-02 07:20:47 -07:00
Vinnie Falco
5fd2bd445c Add parse_dec tests 2018-07-29 17:39:03 -07:00
compmaniak
802390886d Fix parse_dec algorithm
fix #1211
2018-07-29 17:05:11 -07:00
felixguendling
ba4bdfed71 Fix http_server_stackless_ssl.cpp example
fix #1210

Write to self_.stream_ instead of the socket_ directly
2018-07-28 07:00:51 -07:00
Joe Loser
283c9f26f3 Remove some unused variables
fix #1197
2018-07-23 09:20:51 -07:00
Daniela Engert
e0f4c1d769 Most members of std::allocate are deprecated in C++17:
fix #1202

Replace them by their cousins from std::allocator_traits;
otherwise, heaps of deprecation warnings will fall onto
humble users when compiling with MSVC 15 in C++17 mode.

Signed-off-by: Daniela Engert <dani@ngrt.de>
2018-07-23 09:19:46 -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
dd6dff92ab Typo in release notes 2018-07-15 08:32:52 -07:00
cos-public
c2ecba968c Check error in example set_option
fix #1186
2018-07-12 11:07:10 -07:00
Vinnie Falco
b7078c04c9 Set /permissive- 2018-07-12 08:50:54 -07:00
Vinnie Falco
e8c6a82c3b Add test for issue #1188 2018-07-12 08:49:25 -07:00
Vinnie Falco
749e54f31b Generated WebSocket masks use a secure PRNG by default:
This resolves a medium vulnerability described in the
Beast Hybrid Assessment Report by Bishop Fox, where masks generated
for use with outgoing WebSocket client frames use an insufficient
source of entropy and a non-cryptographically secure pseudo-random
number generator.

By default, all newly constructed WebSocket streams will use a
uniquely seeded secure PRNG (ChaCha20 in counter mode). As this may
result in increased CPU resource consumption, the function
websocket::stream::secure_prng() may be used to select a faster but
less secure PRNG, for the case where the caller knows that the secure
generator is not necessary.

On some systems, std::random_device may produce insufficient entropy
to securely seed the PRNG. As this condition cannot be detected by
Beast, callers may use the function websocket::seed_prng() called
once at startup to provide at least 256 bits of entropy which will
be used to uniquely seed all subsequent PRNGs.
2018-07-08 15:20:05 -07:00
Vinnie Falco
68727b3cfb Fix array end calculation in utf8 assertion 2018-07-04 14:40:06 -07:00
Vinnie Falco
20eb6af42d Tidy up Quick Reference 2018-07-04 14:35:59 -07:00
Vinnie Falco
9758e5d223 Fix initialization warning 2018-07-03 10:16:35 -07:00
Vinnie Falco
436f6f96b1 Fix BodyReader constructor requirements doc 2018-06-18 11:09:50 -07:00
Vinnie Falco
37c90220d0 Fix Fields, FieldsWriter concept docs 2018-06-18 08:42:24 -07:00
Vinnie Falco
6647e9ea56 Add experimental icy_stream Shoutcast stream filter:
fix #595, fix #1151

This provides a stream filter which converts the ICY HTTP
response handshake at the beginning of a stream to HTTP/1.1.
2018-06-09 21:12:01 -07:00
Vinnie Falco
39b014263a buffers_adapter improvements:
* Add value()
* Add value_type
* Add in-place constructor
2018-06-09 21:10:25 -07:00
Vinnie Falco
2c5ed4595a Fix buffers_prefix iterator decrement 2018-06-09 13:01:30 -07:00
Vinnie Falco
bd3079f5b4 Fix buffers_adapter max_size 2018-06-09 13:01:30 -07:00
Vinnie Falco
da9bb07d12 Fix buffers_adapter iterator value type 2018-06-08 14:01:17 -07:00
Vinnie Falco
c9298f6522 Remove Autobahn testsuite doc note 2018-05-31 06:27:00 -07:00
Vinnie Falco
5b1022d63e Tidy up composed operation doc
fix #1141
2018-05-29 15:33:55 -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
f948c9cbe5 Fix move-only arguments in bind_handler 2018-05-27 19:05:43 -07:00
Benjamin Buch
3d7f1e7303 Tidy up websocket stream javadocs:
Make clear text()/binary() option is different from got_text()/got_binary().
2018-05-19 07:54:27 -07:00
Vinnie Falco
0afb380f50 Fix unused variable warning
fix #1119
2018-05-18 17:25:56 -07:00
Vinnie Falco
6ea66fd89e Remove spurious assert
fix #1099
2018-05-18 17:25:56 -07:00
Damian Jarek
86555b90ae Add handler_ptr::has_value
This function returns `true` if the container holds a managed object.

Resolves: #1079

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2018-05-18 17:25:56 -07:00
Arvid Norberg
478c19e863 Use the root certificate which matches the fingerprint:
fix #1121

https://www.geotrust.com/resources/root_certificates/certificates/GeoTrust_Global_CA.pem
2018-05-08 14:08:28 -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
f48b978044 Use a shared string for example HTTP server doc roots
fix #1109
2018-05-03 14:18:33 -07:00
Vinnie Falco
a94efc8c92 Add test::stream to experimental 2018-05-02 08:32:09 -07:00
Vinnie Falco
e4c2ae6384 Add test::fail_count to experimental 2018-05-02 08:32:09 -07:00
Vinnie Falco
59f01a158b Add test::error to experimental 2018-05-02 08:32:09 -07:00
Vinnie Falco
292801fef7 Add ssl_stream to experimental:
The ssl_stream wrapper provides C++11 move semantics for ssl::stream,
as well as incorporating the flat_stream workaround for a performance
problem with ssl::stream writes and buffer sequences having length
greater than one.
2018-05-02 08:32:09 -07:00
Vinnie Falco
6108cf3eb7 Add flat_stream to experimental:
This adds a new stream wrapper class template designed to address
a performance shortcoming of boost::asio::ssl::stream.
2018-05-02 08:32:07 -07:00
Vinnie Falco
90c01e82ca Use flat_stream in ssl_stream example code 2018-04-30 19:49:43 -07:00
Vinnie Falco
c9a445a937 New flat_stream example class:
fix #1108

The `flat_stream` is a stream wrapper designed to overcome a
performance limitation of the `boost::asio::ssl::stream`
implementation. Specifically, when writing buffer sequences having
length greater than one, the `ssl::stream` implementation does
not use scatter-gather I/O and instead performs a kernel transition
for every buffer in the sequence.

The wrapper addresses this problem by allocating memory and
presenting the buffer sequence into a single buffer, using
some logic to determine when this allocation is advantageous
versus simply passing the buffers through as-is.

See Also:
https://github.com/boostorg/asio/issues/100
https://stackoverflow.com/questions/50026167/performance-drop-on-port-from-beast-1-0-0-b66-to-boost-1-67-0-beast
2018-04-30 19:49:42 -07:00
Vinnie Falco
dcfd07f6f2 Use fully qualified namespace in BOOST_BEAST_HANDLER_INIT 2018-04-28 11:14:39 -07:00
Vinnie Falco
42ac536f9b Refactor HTTP write_op implementation
fix #764
2018-04-25 14:07:19 -07:00
Vinnie Falco
c5d4f8eede Use boost::void_t
fix #905
2018-04-24 15:14:37 -07:00
Vinnie Falco
14392d7f52 Use buffers_to_string in tests
fix #782
2018-04-24 10:55:39 -07:00
Vinnie Falco
f1b1ee2345 Fix race in advanced server examples
fix #1073
2018-04-12 08:54:44 -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
4b0c14fe5a Use boost::is_convertible as a workaround 2018-03-13 10:47:07 -07:00
Vinnie Falco
90d2df3be3 Tidy up a warning 2018-03-11 14:22:50 -07:00
Daniel James
dabc1c8ae6 Fix BOOST_NO_CXX11_ALLOCATOR check 2018-03-11 14:22:31 -07:00
Vinnie Falco
6a34afb38a
Set version to 164 2018-03-09 09:29:18 -08:00
Vinnie Falco
c984f6c94d Fix masking on continuation frames 2018-03-09 07:51:33 -08:00
Daniela Engert
a7b78ac1bc fix narrowing warnings
Signed-off-by: Daniela Engert <dani@ngrt.de>
2018-03-04 15:13:32 -08:00
Vinnie Falco
5eaa2be85e Tidy up calls to post() 2018-03-04 13:19:17 -08:00
Vinnie Falco
ebd036a300 Improve websocket::stream::control_callback javadoc
fix #1053
2018-03-01 11:32:58 -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
Christos Stratopoulos
5a53bd449a Don't copy the handler in write_some_op 2018-02-28 13:20:56 -08:00
Vinnie Falco
04ced3b954 Examples clear the HTTP message before reading
fix #1043
2018-02-27 08:12: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
a8a5fa9f6c Fix typo in release notes 2018-02-26 17:09:01 -08:00
Vinnie Falco
eae74b1c89 get_lowest_layer is a type alias:
fix #941, fix #1016

`get_lowest_layer` is now a type alias for the
lowest layer instead of a struct with a nested type.

Actions required:

* Replace instances of `typename get_lowest_layer<T>::type`
  with `get_lowest_layer<T>`.
2018-02-21 14:49:44 -08:00
Vinnie Falco
66f0814cfd Tidy up some documentation
fix #984
2018-02-21 13:58:43 -08:00
Vinnie Falco
d79950d95c DynamicBuffer input areas are not mutable
fix #1014
2018-02-21 13:19:14 -08:00
Vinnie Falco
10ce0283c2 Advanced servers support clean shutdown via SIGINT or SIGTERM
fix #1026
2018-02-21 12:44:11 -08:00
Vinnie Falco
a4714746dc Examples set reuse_address(true)
fix #1027
2018-02-21 12:35:07 -08:00
Vinnie Falco
490b9ce893 Tidy up websocket docs
fix #1035
2018-02-21 12:10:26 -08:00
Vinnie Falco
8dcc6162c1 Tidy up end_of_stream javadoc
fix #1023
2018-02-21 08:45:08 -08:00
Vinnie Falco
c505e32210 Fix big-endian websocket masking
fix #1030
2018-02-21 06:35:32 -08:00
Vinnie Falco
593ccb15cd Fix teardown for TIME_WAIT
fix #1024, fix #1029
2018-02-20 04:33:43 -08:00
Vinnie Falco
b249d6f868 Fix stale link for void-or-deduced 2018-02-19 18:36:31 -08:00
Vinnie Falco
b68db30ba6 Add release notes to documentation 2018-02-19 18:36:31 -08:00
Vinnie Falco
a4eb96fcb9 Don't use typeid 2018-02-19 18:36:30 -08:00
Vinnie Falco
534ba34e7e Tidy up bind_handler doc 2018-02-16 10:51:28 -08:00
Benjamin Roland Buch
b7750de15f Fix fallthrough warnings
fix #1019
2018-02-16 10:51:28 -08:00
Vinnie Falco
ab32400d00 Fix soft-mutex assert in websocket stream:
Fix #1000

This resolves the assert 'ws_.wr_block_ == tok_'.
2018-02-16 10:51:28 -08:00
Benjamin Roland Buch
9f3c981d6a Fix memory leak in advanced server examples 2018-02-14 21:24:59 -08:00
Vinnie Falco
c9bbf7bdbc bind_handler works with boost placeholders 2018-01-26 10:12:40 -08:00
Vinnie Falco
2f03cc7895 Tidy up bind_handler doc
fix #985
2018-01-26 10:12:15 -08:00
Vinnie Falco
d855bdefd8 Type check completion handlers
fix #988
2018-01-26 08:58:19 -08:00
Vinnie Falco
38e580e49d Add Bishop Fox interview media 2018-01-25 06:02:43 -08:00
Vinnie Falco
72cf7db931 Fix use-after-move in example request handlers
fix #992
2018-01-25 06:02:43 -08:00
Peter Jankuliak
4fb535ece6 Fix iterator version of basic_fields::erase
fix #994
2018-01-25 06:02:43 -08:00
Vinnie Falco
ad42096a9d Avoid string_view::clear:
String views are cleared using assignment from
braced initializion, to avoid calling clear().
2018-01-25 06:02:42 -08:00
Vinnie Falco
2b32de6cba Update README.md for branches
fix #974
2018-01-25 06:02:42 -08:00
Paul "TBBle" Hampson
0efc246466 Use boost::winapi::GetLastError() consistently:
This replaces a few direct calls to ::GetLastError, and also removes a
couple of duplicate calls when the value was already held locally.
2018-01-12 12:30:39 -08:00
Paul "TBBle" Hampson
035248cefb Use make_error_code for setting an error_code from errc:
In Boost.System, `boost::system::errc` is a namespace
containing ints. In C++11, std::errc is an enum marked
as an `error_condition`.

`error_code::assign` is specified as taking an int only,
while make_error_code is able to deal correctly with both forms.
2018-01-12 12:30:39 -08:00
Vinnie Falco
3546eff033 Remove BOOST_VERSION checks
fix #722
2018-01-12 12:30:39 -08:00
Vinnie Falco
24358f784a Disable gdb on Travis for Meltdown 2018-01-12 11:54:29 -08:00
Vinnie Falco
cc43b46c42 Refactor WebSocket errors (API Change):
fix #949

* New error codes are introduced for WebSocket failures

* More verbose messages for error codes

* Error codes are mapped to conditions for ease of testing

* error::failed and error::handshake_failed are deprecated (don't use)

Actions Required:

* Code which explicitly compares error_code values against the
  constant `websocket::error::handshake_failed` should compare
  against `websocket::condition::handshake_failed` instead.

* Code which explicitly compares error_code values against the
  constant `websocket::error::failed` should compare
  against `websocket::condition::protocol_violation` instead.
2018-01-12 07:35:26 -08:00
Vinnie Falco
08a9ed4c25 Add WebSocket error conditions:
This introduces the condition enumeration type for grouping
websocket error codes together as a convenience to callers.
2018-01-01 13:38:55 -08:00
Vinnie Falco
b86169019e Refactor error headers:
The WebSocket error header file declarations are
reorganized to make it easier to move function
definitions into their own translation unit.
2018-01-01 12:17:02 -08:00
Vinnie Falco
45798e0a6e Refactor detect_ssl_op:
fix #955

The asynchronous SSL detector uses a stackless coroutine.
2017-12-31 10:50:26 -08:00
Vinnie Falco
d7664fa140 Redistribute the read tests in the translation units 2017-12-31 10:28:42 -08:00
Vinnie Falco
841ab8474b permessage-deflate is a compile-time feature (API Change):
fix #849

This adds an additional `bool` template parameter to
`websocket::stream`:

* When deflateSupported is `true`, the stream will be capable
  of negotiating the permessage-deflate websocket extension per
  the configured run-time settings.

* When deflateSupported is `false`, the stream will never negotiate
  the permessage-deflate websocket extension. Furthermore, all of the
  code necessary for implementing the permessage-deflate extension
  will be excluded from function instantiations. The resulting emitted
  object code should be smaller.
2017-12-30 13:23:41 -08:00
Vinnie Falco
65d92f62fb Fix high-ASCII in source file 2017-12-30 09:20:28 -08:00
Vinnie Falco
8c5440aae1 Depend on container_hash 2017-12-30 07:11:25 -08:00
Vinnie Falco
cccb6a07fc http::parser is not MoveConstructible (API Change) 2017-12-30 06:08:28 -08:00
Vinnie Falco
b6c3cb30ae Remove unnecessary include 2017-12-29 09:26:29 -08:00
Vinnie Falco
5dcef24ea7 Add stream_fwd.hpp 2017-12-29 09:25:18 -08:00
Vinnie Falco
eddadacba7 Control callback is invoked on the execution context:
fix #954

Fix a defect where the control callback could execute
on the same stack as the initiating function.
2017-12-27 18:17:09 -08:00
Vinnie Falco
dabb78afe7 Sanitizer failures are errors 2017-12-23 08:46:34 -08:00
Vinnie Falco
4a4d535d98 Documentation 2017-12-15 09:27:40 -08:00
Vinnie Falco
d796319476 serializer::reader_impl is deprecated:
fix #930

* The function serializer::reader_impl is deprecated and will
  be removed in a subsequent version.

* Some private symbols used in the implementation were
  also renamed to reflect correct terminology.

Actions Required:

* Call serializer::writer_impl instead of reader_impl
2017-12-14 13:13:10 -08:00
Damian Jarek
96e04022c4 handler_ptr tests:
fix #932

Ensure handler_ptr cleans up when move-constructing
a handler throws an exception.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2017-12-11 10:45:03 -08:00
Damian Jarek
aac2bf1596 Fix Travis memory utilization:
Split the websocket read test to reduce compile time memory usage
by a small amount, which ought to be enough to let it compile in
a constrained environment like Travis.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2017-12-09 12:53:28 -08:00
Damian Jarek
285965d82e handler_ptr gives the strong exception guarantee (API Change):
* The handler_ptr constructor now provides the
  strong exception guarantee.

* The signature for managed objects constructed by
  `handler_ptr` receives a const reference to the handler.

Actions required:

* Change the constructor signature for state objects
  used with handler_ptr to receive a const reference to
  the handler.
2017-12-08 10:58:46 -08:00
Damian Jarek
e08132106e handler_ptr is move-only:
It is no longer a reference counted object and now has semantics
close to a std::unique_ptr.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2017-12-04 13:07:17 -08:00
Damian Jarek
200e898f7e Don't copy completion handlers:
All asynchronous operations will now be able to use move-only
CompletionHandlers.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2017-12-04 12:14:40 -08:00
Vinnie Falco
3361df142c pausation always allocates 2017-12-04 12:14:39 -08:00
Vinnie Falco
eb0cc97e1a Protect calls from macros
fix #918
2017-12-04 12:14:11 -08:00
Vinnie Falco
eb412ee958 Fix CMakeLists.txt variable 2017-12-04 12:14:11 -08:00
Vinnie Falco
c01224ddc4 Tidy up ssl_stream special members
fix #916
2017-12-04 12:14:11 -08:00
Vinnie Falco
13b9d1bd92 built-in r-value return values can't be assigned:
This fixes the following warning:

  warning: ‘const’ type qualifier on return type has no effect [-Wignored-qualifiers]
2017-12-04 12:14:09 -08:00
Vinnie Falco
8a2a4578b6 Merge v144-hf1 2017-12-04 12:09:24 -08:00
Vinnie Falco
4053c1bb09 Handle invalid deflate frames:
This fixes a problem where an assert is generated or an
error is ignored when an invalid deflate stream is produced
after appending the final empty deflate block.
2017-12-04 12:05:36 -08:00
Vinnie Falco
1b86bc3c36 Update reports for hybrid assessment 2017-12-04 12:05:27 -08:00
Vinnie Falco
e2b473753b Install codecov on codecov CI targets only 2017-12-04 12:04:55 -08:00
Vinnie Falco
0d8b79abb5 Install codecov on codecov CI targets only 2017-12-03 12:49:51 -08:00
Vinnie Falco
2f451badc8 Handle invalid deflate frames:
This fixes a problem where an assert is generated or an
error is ignored when an invalid deflate stream is produced
after appending the final empty deflate block.
2017-12-03 01:13:41 -08:00
Vinnie Falco
1069b4ab22 Update reports for hybrid assessment 2017-12-03 01:13:23 -08:00
Damian Jarek
190d20e3a8 Tidy up basic_fields exception specifiers
fix #894

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2017-11-28 04:51:18 -08:00
Vinnie Falco
7ac24d77be Send idle pings in advanced servers:
fix #899

The timer logic for the advanced-server and advanced-server-flex
examples is refactored to use idle pings when the connection has
not seen activity for some period of time. This demonstrates the
use of the stream's control_callback interface.
2017-11-27 16:44:59 -08:00
Vinnie Falco
8181851719 control callback is copied or moved:
The function stream::control_callback now copies or moves
the callback. In some cases this may require a dynamic
allocation.

To avoid the possibility of a dynamic allocation, callers
may wrap their callback using `std::ref` before setting it.
2017-11-27 15:05:58 -08:00
Vinnie Falco
ab91844039 Use iterator wrapper in detail::buffers_range
fix #907
2017-11-26 14:18:21 -08:00
Vinnie Falco
8c73c0d300 Don't use boost::string_ref 2017-11-26 14:01:49 -08:00
Vinnie Falco
b59d0a5cd5 Use variant in buffers_cat_view 2017-11-26 12:18:53 -08:00
Damian Jarek
332c2fe0cb Add detail::aligned_union and tidy up
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2017-11-26 12:18:53 -08:00
p-kalugin
fb0d82245f Fix typo in examples documentation 2017-11-26 09:55:38 -08:00
Vinnie Falco
9d941f2655 Documentation tidying 2017-11-22 10:29:19 -08:00
Vinnie Falco
59107701d2 Remove unintended public members of handler_ptr 2017-11-21 15:03:47 -08:00
Vinnie Falco
639266fd64 Faster ascii_tolower 2017-11-21 15:03:43 -08:00
zerotypos-found
99bf3f5556 Fix some typos 2017-11-21 08:11:20 -08:00
Vinnie Falco
25c5f2e844 basic_fields does not support fancy pointers
fix #896
2017-11-20 12:12:06 -08:00
Vinnie Falco
d203bf342b Version 124 works with Boost 1.65.1 and earlier
fix #874
2017-11-20 11:52:03 -08:00
Vinnie Falco
110a0d52e2 null_buffers is deprecated 2017-11-20 11:48:57 -08:00
Vinnie Falco
75fcea69ee Refactor HTTP async read composed operations
fix #810
2017-11-18 19:47:35 -08:00
Vinnie Falco
5ae15432b8 Refactor basic_fields allocator internals:
fix #857

* Use empty base optimization to store the allocator

* Rebind to a smaller aligned type to reduce waste
2017-11-18 18:14:15 -08:00
Vinnie Falco
a55e67b94f Rename some detail functions 2017-11-18 18:14:14 -08:00
Vinnie Falco
73eba08cf4 Fix websocket permessage-deflate negotiation 2017-11-18 18:06:56 -08:00
Vinnie Falco
a4a2ee8806 Fix autobahn report link 2017-11-13 12:18:30 -08:00
Vinnie Falco
c37ce4b15e Fix name typo in http write test 2017-11-11 09:41:06 -08:00
Vinnie Falco
afca4cc277 Warn about upcoming API changes to certain concepts 2017-11-11 09:13:05 -08:00
Vinnie Falco
99d6d35c62 Tidy up some documentation
fix #880, fix #881
2017-11-10 16:41:14 -08:00
Vinnie Falco
ff2dc67afa Some basic_fields special members are protected 2017-11-08 20:13:09 -08:00
Damian Jarek
0f7670b7e0 Tidy up basic_parser:
- Add const qualifiers.
- Fix parser conversion constructor not copying header_limit_ and status_ fields.
- Use default special member functions when possible.
- Zero-initialize non-class members.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2017-11-08 20:13:09 -08:00
Casey Bodley
f96785df4f Fix signature for async_read_some, and tests
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2017-11-08 19:58:46 -08:00
Miguel Portilla
a1db3cab9f Fix UTF8_checker test failures 2017-11-08 19:58:45 -08:00
Vinnie Falco
2ed1d9affb Fix some integer warnings in 64-bit builds 2017-11-07 07:10:31 -08:00
Sergey M․
8e75ed26d1 Revisit boost library min/max guidance
refs #170
2017-11-05 13:03:09 -08:00
Vinnie Falco
120617f438 Tidy up some documentation 2017-11-05 09:29:33 -08:00
Vinnie Falco
fdd02d9ee7 Tidy up some documented constructor syntax 2017-11-03 19:41:34 -07:00
Vinnie Falco
327ebc2007 Add FieldsWriter constructor requirement
fix #864
2017-11-03 19:36:35 -07:00
Vinnie Falco
d9d2b23b57 ConstBufferSequence mandates pointer equivalence
fix #865
2017-11-03 19:34:30 -07:00
Vinnie Falco
14926bfb3f
Tidy up message doc image 2017-11-02 15:52:57 -07:00
Vinnie Falco
12a355efc9 Fix typo in example server help text 2017-11-01 11:31:03 -07:00
Vinnie Falco
5a35a33905 Add static_buffer_base default constructor definition
fix #862
2017-11-01 10:39:01 -07:00
Vinnie Falco
5177d729a7 Remove const&& overload of message::body 2017-10-31 14:43:10 -07:00
Vinnie Falco
895c9fa7ed BodyReader and BodyWriter names are swapped (API Change):
Body::reader and Body::writer meanings are reversed, for
consistency with the names of the stream operations:

* Body::reader is used for read, read_some, async_read, async_read_some
* Body::writer is used for write, write_some, async_write, async_write_some

Actions Required:

* Swap the reader and writer names for user defined Body types
* Swap use of is_body_reader and is_body_writer
2017-10-30 18:13:40 -07:00
Vinnie Falco
101023553e Fields::writer replaces Fields::reader (API Change):
* Fields::writer replaces Fields::reader
* The FieldsWriter concept is renamed from FieldsReader

Actions Required:

* Rename reader to writer for user defined Fields
2017-10-30 17:53:59 -07:00
Vinnie Falco
14653be0cc Tidy up FieldsReader doc 2017-10-30 15:59:05 -07:00
Vinnie Falco
23bf8638ab Add ref-qualified overloads for message::body 2017-10-30 15:23:43 -07:00
Vinnie Falco
e39e4c73bf Rename Cmake variables for clarity 2017-10-30 12:35:56 -07:00
Vinnie Falco
42679ee0bc Tidy up project folders in CMakeLists.txt 2017-10-30 12:35:55 -07:00
Vinnie Falco
b75d4e5e14 Set SNI hostname in example SSL clients
fix #853
2017-10-29 14:58:57 -07:00
Vinnie Falco
c5a1615301 basic_fields returns const values 2017-10-29 06:45:33 -07:00
Vinnie Falco
d8a0200929 Remove cxx11_sfinae_expr build requirement from tests 2017-10-27 17:03:44 -07:00
Vinnie Falco
970daa340a Tidy up fallthrough warning 2017-10-27 17:03:44 -07:00
Vinnie Falco
597802c38a Fix prepare_payload: chunked is HTTP/1.1 2017-10-27 11:16:10 -07:00
Vinnie Falco
b5389ba5f2 Documentation tidying
fix #836
2017-10-27 11:16:09 -07:00
Vinnie Falco
c3367e0746 Add autobahn test report to doc 2017-10-26 11:08:24 -07:00
Vinnie Falco
55185b8de9 Add explicit-failures-markup.xml 2017-10-26 08:13:41 -07:00
Vinnie Falco
2746184850 Tidy up fast websocket server host names 2017-10-26 05:52:56 -07:00
Vinnie Falco
c029efaf7c Temporarily disable utf8 validation tests 2017-10-26 00:00:35 -07:00
Vinnie Falco
85f2dcca33 Fix utf8 validation for autobahn 2017-10-25 23:24:31 -07:00
Vinnie Falco
3d3bc87042 Use synchronous writes in chunk output example 2017-10-25 23:24:31 -07:00
Vinnie Falco
2555942010 Use message::need_eof in example servers 2017-10-25 18:48:19 -07:00
Vinnie Falco
1754d5427d Add message::need_eof 2017-10-25 18:41:04 -07:00
Vinnie Falco
5c14ab9f7c Rename some basic_parser observers (API Change):
Some `basic_parser` member functions are renamed:

* chunked() was is_chunked()
* upgrade() was is_upgrade()
* keep_alive() was is_keep_alive()

Actions Required:

* Rename member function invocations at call sites
2017-10-25 18:04:54 -07:00
Vinnie Falco
6225c5bd2f Add has_content_length_impl to Fields (API Change):
* The function has_content_length_impl is added to the
  requirements of Fields.

Actions Required:

* Implement has_content_length_impl for user-defined Fields
2017-10-25 17:58:45 -07:00
Vinnie Falco
feb525f829 Remove serializer::chunked (API Change):
* The function serializer::chunked is removed,
  since it is redundant.

Actions Required:

* Call serializer::get::chunked instead of serializer::chunked
2017-10-25 17:09:04 -07:00
Vinnie Falco
129c7d8b78 Remove serializer::keep_alive (API Change):
* The serializer::keep_alive function is removed

Actions Required:

* Call message::keep_alive instead of serializer::keep_alive
2017-10-25 17:09:03 -07:00
Vinnie Falco
93c849d6d4 Update doc links 2017-10-25 17:08:48 -07:00
Vinnie Falco
4927fa42d7 More Jamfile compiler requirements for tests 2017-10-25 11:45:40 -07:00
Sorin Fetche
f4facffae3 Version command line option for HTTP client examples:
The examples HTTP clients allow an optional command line switch
to choose the HTTP-version used ("1.0" or "1.1").
2017-10-25 10:33:24 -07:00
Berkus Decker
bea7d6e019 Add BOOST_BEAST_NO_POSIX_FADVISE 2017-10-25 10:17:25 -07:00
Vinnie Falco
6ccc61d940 Fix buffered_read_stream async_read_some signature 2017-10-24 14:26:05 -07:00
Andrey Semashev
ab2a225a9a Update Boost.WinAPI usage to the new location and namespace. 2017-10-24 13:32:50 -07:00
Peter Dimov
645fdb6581 Add Travis tests with the default compilers 2017-10-24 09:33:30 -07:00
Vinnie Falco
41e61a7458 Fix executor type compilation 2017-10-24 09:33:29 -07:00
Vinnie Falco
e94dcae10c Fix shadowing in session_alloc 2017-10-24 09:33:29 -07:00
Vinnie Falco
c4bef9cc29 Fix doc typo 2017-10-23 20:19:53 -07:00
Vinnie Falco
e146f2c7be Don't return end_of_stream on win32 file body writes 2017-10-23 20:19:51 -07:00
Vinnie Falco
8312c6eb86 Tidy up unused variable warnings 2017-10-23 20:19:36 -07:00
Vinnie Falco
1faac0b0fb Update stream write documentation for end of stream changes 2017-10-23 18:36:01 -07:00
Vinnie Falco
4337804f5d Update README.md 2017-10-23 18:03:29 -07:00
Vinnie Falco
42095dcb34 Add CppCon2017 presentation link 2017-10-23 17:54:33 -07:00
Vinnie Falco
3a28e999af Update for Net-TS Asio (API Change):
fix #769

The following classes are removed:

* handler_type
* async_result
* async_completion
* is_dynamic_buffer
* is_const_buffer_sequence
* is_mutable_buffer_sequence
* handler_alloc

Actions Required:

* Use BOOST_ASIO_HANDLER_TYPE instead of handler_type
* Use BOOST_ASIO_INITFN_RESULT_TYPE instead of async_result
* Use boost::asio::async_completion
* Use boost::asio::is_dynamic_buffer
* Use boost::asio::is_const_buffer_sequence
* Use boost::asio::is_mutable_buffer_sequence
* boost::asio::associated_allocator_t replaces handler_alloc
2017-10-23 17:11:27 -07:00
Vinnie Falco
5c6b232654 Fix basic_fields javadoc 2017-10-22 10:03:40 -07:00
Vinnie Falco
56fee93601 Fix for a test matrix compiler 2017-10-22 07:03:14 -07:00
Vinnie Falco
d0d4e0a740 http write returns success on connection close (API Change):
fix #767

The write family of HTTP stream algorithms no longer returns
error::end_of_stream when the message indicates that the connection
should be closed.

Actions Required:

* Add code to servers to close the connection after successfully
  writing a message where `message::keep_alive()` would return `false`.
2017-10-22 07:03:04 -07:00
Vinnie Falco
2399b610e3 Clear previous message fields in parser
fix #818
2017-10-16 12:09:41 -07:00
Vinnie Falco
e832baf93f Check compiler feature in Jamfile 2017-10-16 09:16:26 -07:00
Vinnie Falco
a30d30e379 Fix spurious race in websocket close test 2017-10-15 10:41:16 -07:00
Vinnie Falco
1e412715b1 Use unit-test subtree 2017-10-15 09:00:07 -07:00
Vinnie Falco
6ca2ef8449 Add missing case in error test 2017-10-10 08:17:23 -07:00
Vinnie Falco
8179be560e config.hpp is not a public header 2017-10-10 07:49:12 -07:00
Vinnie Falco
7594c88f8f CMake 3.5.1 is required 2017-10-09 14:35:56 -07:00
Vinnie Falco
2ac6936312 Fix zlib symbol conflicts
fix #808
2017-10-07 13:59:04 -07:00
Vinnie Falco
a517df9090 assert on empty buffer in websocket read 2017-10-07 11:17:13 -07:00
Vinnie Falco
6e08fa0a21 Add test for issue 807 2017-10-05 19:24:35 -07:00
Gyorgy Szekely
471638c60e Fix enum and non-enum in conditional exp. warning 2017-10-03 06:13:11 -07:00
Vinnie Falco
f5f1b7d6fa Add test for issue 802 2017-10-03 06:13:10 -07:00
Vinnie Falco
c0cf030528 OpenSSL targets are optional (CMake) 2017-10-01 10:34:17 -07:00
Vinnie Falco
bbc1f14347 Fix spurious strand_ in advanced_server_flex 2017-10-01 10:14:47 -07:00
Vinnie Falco
167f9641a4 Tidy up doc badge links 2017-09-30 07:25:33 -07:00
Vinnie Falco
ac6c23dd6b Doc root is at index.html
fix #795
2017-09-26 10:03:46 -07:00
Vinnie Falco
04bf98298f Update build instructions
fix #796
2017-09-26 10:03:46 -07:00
Peter Jankuliak
fa4df7eb60 Remove unused strands in server examples 2017-09-25 21:33:04 -07:00
Nils Gladitz
c81558e38b file_win32 opens for read-only in shared mode:
fix #786

Without this change the second opening of an
already opened file fails with:

  "The process cannot access the file because it
  is being used by another process"
2017-09-25 21:33:04 -07:00
Peter Jankuliak
5a7b8b23db
Fix writing headers into std::ostream 2017-09-21 16:08:19 -07:00
Vinnie Falco
b5f22bdef6 Add buffers_to_string
fix #772
2017-09-20 08:31:36 -07:00
Vinnie Falco
2c656a22f9 Remove buffers_suffix::get (API Change):
* buffers_suffix::get member function is removed

Actions Required:

* Avoid calling buffers_suffix::get
2017-09-20 08:31:36 -07:00
Vinnie Falco
06fb2b9dfc buffers_cat replaces buffer_cat (API Change):
fix #773

* buffer_cat is renamed to buffers_cat
* buffer_cat_view is renamed to buffers_cat_view

Actions Required:

* Use buffers_cat instead of buffer_cat
* Use buffers_cat_view instead of buffer_cat_view
2017-09-15 12:52:59 -07:00
Vinnie Falco
38c2816539 buffers_front replaces buffer_front (API Change):
fix #773

* buffer_front is renamed to buffer_front

Actions Required:

* Use buffers_front instead of buffer_front
2017-09-15 12:52:59 -07:00
Vinnie Falco
e94a65b04a buffers_prefix replaces buffer_prefix (API Change)
fix #773

* buffer_prefix is renamed to buffers_prefix
* buffer_prefix_view is renamed to buffers_prefix_view

Actions Required:

* Use buffers_prefix instead of buffer_prefix
* Use buffers_prefix_view instead of buffer_prefix_view
2017-09-15 12:52:58 -07:00
Vinnie Falco
795da80859 buffers_suffix replaces consuming_buffers (API Change):
fix #770

* consuming_buffers is renamed to buffers_suffix

Actions Required:

* Use buffers_suffix instead of consuming_buffers
2017-09-15 12:52:45 -07:00
Vinnie Falco
38e28966ea message::version is a member function (API Change):
fix #778

* The version data member is replaced with accessor
  member functions.

Actions Required:

* Call member function message::version instead of accessing
  the version member at call sites.
2017-09-12 17:13:02 -07:00
Vinnie Falco
54fe7cacf7 message::body is a member function (API Change):
fix #778

* The body data member is replaced with accessor
  member functions.

Actions Required:

* Call member function message::body instead of accessing
  the data member at call sites.
2017-09-12 17:12:12 -07:00
Vinnie Falco
1de06dfaeb Update README.md master doc link 2017-09-10 16:10:47 -07:00
Vinnie Falco
60a33019d4
Set version to 114 2017-09-10 14:35:52 -07:00
Howard Hinnant
4880cdd472 Remove field_range copy constructor
*  This presence of the user-declared copy constructor makes
   the compiler-provided copy assignment operator deprecated.
   This change allows the compiler to provide both copy members
   without deprecated behavior.
2017-09-09 06:49:39 -07:00
Vinnie Falco
0007afdaf2 Fix handler signature in async_read_header 2017-09-09 06:39:49 -07:00
Vinnie Falco
49d9d47a0b HTTP reads and writes return bytes transferred (API Change):
* HTTP read and write operations now return the
  number of bytes transferred to or from the stream.

Actions Required:

* Modify HTTP read and/or write completion handlers to receive
  the extra std::size_t bytes_transferred parameter.
2017-09-03 20:37:28 -07:00
Vinnie Falco
cc8246e27e Update websocket notes 2017-09-03 20:05:20 -07:00
Vinnie Falco
c0e5f14702 WebSocket writes return the bytes transferred (API Change):
* Stream write operations now return the number of bytes
transferred from the caller's input buffers.

Actions Required:

* Modify websocket write completion handlers to receive
  the extra std::size_t bytes_transferred parameter.
2017-09-03 20:05:19 -07:00
Vinnie Falco
647b3d68e1 Suspended ops special members 2017-08-31 17:52:37 -07:00
Vinnie Falco
51a5a36118 Refactor stream operations and tests plus coverage 2017-08-31 17:52:36 -07:00
Vinnie Falco
9f089c2a33 Fix utf8 check split code point at buffer end 2017-08-31 17:52:36 -07:00
Vinnie Falco
b13e02bb55 Fix invalid iterator in test reporter
fix #755
2017-08-29 08:22:12 -07:00
Damian Jarek
96c53a048f Add Add test::stream::lowest_layer:
This allows the stream to be used as the next layer type in
a stack of network stream layers.

Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
2017-08-28 22:16:23 -07:00
Vinnie Falco
30b98674d5 Refactor websocket stream: fixes and tests 2017-08-28 22:16:22 -07:00
Vinnie Falco
1d5b3f488e Refactor websocket stream members 2017-08-26 20:12:21 -07:00
Vinnie Falco
4c335a64cf Refactor stream open state variable 2017-08-26 20:12:04 -07:00
Vinnie Falco
df7b068fa7 websocket read tests 2017-08-25 07:40:05 -07:00
Vinnie Falco
142b785119 split up websocket tests 2017-08-24 06:38:47 -07:00
Vinnie Falco
5ac51a1054 websocket write tests 2017-08-23 14:38:29 -07:00
Vinnie Falco
2697c26238 Fix websocket close_op resume state 2017-08-23 14:34:14 -07:00
Vinnie Falco
463accffd1 Refactor test::stream 2017-08-23 14:34:13 -07:00
Vinnie Falco
99822aebf5 websocket ping tests 2017-08-23 14:34:13 -07:00
Vinnie Falco
6809c18afa websocket handshake uses coroutine 2017-08-23 14:34:13 -07:00
Vinnie Falco
96eff81cea websocket close fixes and tests 2017-08-23 14:34:13 -07:00
Vinnie Falco
7e815435f6 websocket accept refactoring (API Change):
* stream overloads of accept which take both a message
  and a buffer sequence are removed.

Actions Required:

* Do not call websocket accept overloads which take
  both a message and a buffer sequence, as it is
  illegal per rfc6455.
2017-08-23 14:34:13 -07:00
Vinnie Falco
7a96dc4e11 Fix async_read_some handler signature 2017-08-23 14:34:13 -07:00
Vinnie Falco
59d4b85e15 Don't use async_write_msg in examples
fix #746
2017-08-18 07:55:30 -07:00
Vinnie Falco
830e651f99 Fix argument parsing in HTTP examples
fix #746
2017-08-18 07:55:20 -07:00
Vinnie Falco
2c73eeef7c Use test::stream 2017-08-16 18:26:48 -07:00
Vinnie Falco
e690528132 Rename frame and header buffer types
fix #736
2017-08-15 16:59:17 -07:00
Vinnie Falco
3d6a009a96 Fix utf8 check for compressed frames 2017-08-15 16:33:25 -07:00
Vinnie Falco
a435dde2a3 Fix done state for WebSocket reads 2017-08-15 12:49:02 -07:00
Vinnie Falco
76feb4afd4 Fix for basic_parser::skip(true) and docs
fix #742
2017-08-15 07:00:56 -07:00
Vinnie Falco
f570593a01 Tidy up utf8_checker and tests 2017-08-14 15:41:35 -07:00