Commit Graph

921 Commits

Author SHA1 Message Date
Vinnie Falco 241795cd73 Set version to 1.0.0-b12 2016-08-29 15:07:23 -04:00
Vinnie Falco 411b2534ed Use -p to print suites from unit test main 2016-08-29 15:07:15 -04:00
Vinnie Falco 253f138aff Add BEAST_EXPECTS test failure macro:
New overloads of suite::expect take the file and line number
as individual parameters, cleaning up the file name output
by showing only the filename part (to not leak the full path,
which might contain sensitive information).

A new macro BEAST_EXPECTS allows an additional reason
string as well as reporting the file and line. Typical usage:

    ```
    error_code ec;
    ...
    if(! BEAST_EXPECTS(! ec, ec.message()))
        return;
    ```
2016-08-29 13:46:31 -04:00
Vinnie Falco dadbab4c0f Fix unit test runner to output all case names:
Also fixes a bug where suite::log was incorrectly flushed.
2016-08-29 11:48:45 -04:00
Vinnie Falco d9017a3f76 Tidy up whitespace 2016-08-29 11:47:01 -04:00
Vinnie Falco aedfaab93d Update README, rename CHANGELOG 2016-08-29 10:29:07 -04:00
Vinnie Falco d263d4d449 Set version to 1.0.0-b11 2016-08-26 13:06:51 -04:00
Keaton Okkonen b39e4817e5 Update README.md (fix #62) 2016-08-26 13:06:44 -04:00
Vinnie Falco 4dfa250a34 Rename websocket echo servers (fix #46) 2016-08-26 13:06:44 -04:00
Vinnie Falco 8a6908c072 Rename to DynamicBuffer (fix #47) 2016-08-26 13:06:43 -04:00
Vinnie Falco d8fe737ad7 Number error codes from 1 (fix #54) 2016-08-26 13:06:43 -04:00
Vinnie Falco 61023c3f4a Update HTTP documentation (fix #61, #60, #59) 2016-08-26 13:06:42 -04:00
Vinnie Falco b607d47bd3 Restyle sources 2016-08-26 13:06:42 -04:00
Vinnie Falco 878c0f2a19 Set URI in generated WebSocket Upgrade requests (fix #64):
The 'resource' parameter in the call to stream::handshake is
used when building the HTTP request to perform the upgrade.
2016-08-26 13:06:42 -04:00
Vinnie Falco 19dd983d2b Fix integer warnings in 64-bit Windows build 2016-08-26 13:06:41 -04:00
Vinnie Falco c15751ced6 Update documentation and images 2016-08-26 13:06:41 -04:00
Vinnie Falco a55d9aa4c3 Tidy up 32 and 64 bit build support (fix #49):
This fixes up support for building both 32 and 64 bit targets, especially on Windows.
2016-08-26 13:06:39 -04:00
Nik Bougalis 037d52114a Print the testcase header prior to logging (fix #56) 2016-08-26 07:33:43 -07:00
Vinnie Falco 3ff56eb071 Set version to 1.0.0-b10 2016-08-12 21:02:44 -04:00
Vinnie Falco 9e8a5a5765 Update README.md for CppCon 2016 2016-08-12 21:02:40 -04:00
Vinnie Falco 461a8ea846 Add WebSocket implementation comparison doc 2016-08-12 21:02:40 -04:00
Vinnie Falco 8d9c0daa9d Add BEAST_EXPECT macro:
This macro is used in the unit test framework to assist in
reporting the file and line number of test failures.
2016-08-12 21:02:40 -04:00
Ties Jan Hefting 1537527927 Fix warnings 2016-08-12 21:02:39 -04:00
Vinnie Falco 8204d9524e Set version to 1.0.0-b9 2016-07-22 11:57:13 -04:00
wilsonianb 07bf106cd3 Handle undefined VARIANT in cmake 2016-07-22 11:56:40 -04:00
Vinnie Falco 225b5a1204 Set version to 1.0.0-b8 2016-07-21 17:03:54 -04:00
Vinnie Falco 054d5de877 Fix rfc2616 Section 4.2 compliance:
basic_headers no longer combines fields with the same name by appending
a comma and concatenating the two values together. This was breaking
certain header fields which expect each value to be distinct, such as
the "Set-Cookie" header.

Now the container behaves more like a multi set with respect to insertion
of multiple values with the same field name. Additional member functions
are provided to provide extra functionality.
2016-07-21 17:03:19 -04:00
Vinnie Falco 5349bcc1c5 Update Example code in documentation 2016-07-21 17:03:18 -04:00
Jack Bond-Preston 17fd2ef2e2 Fix to_string.hpp include path in example code 2016-07-21 17:03:18 -04:00
wilsonianb e199c0555c Build coverage and usan Travis CI targets with CMake 2016-07-21 17:03:18 -04:00
seelabs 42557b800c Add cmake and clang build to travis 2016-07-21 17:03:18 -04:00
Casey Bodley ef2330d477 Use Threads::Threads interface library in cmake
in addition to passing ${CMAKE_THREAD_LIBS_INIT} to the linker, this
interface library will also add -pthread to the compile options when
supported

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2016-07-21 17:03:17 -04:00
Vinnie Falco f8a1ec0348 Set Beast version to 1.0.0-b7 2016-07-06 13:37:28 -04:00
Vinnie Falco 8375ae647e Add skip_body parser option 2016-07-06 13:36:15 -04:00
Vinnie Falco 69da298aa7 Remove extraneous header file status.hpp 2016-07-06 13:36:15 -04:00
Vinnie Falco 6765507cc4 Add usage example to rfc7230 javadocs 2016-07-06 13:36:14 -04:00
Vinnie Falco e2c67a1666 Fixes and documentation for teardown and use with SSL:
This solves a problem where clang and gcc locate the deleted
version of teardown and async_teardown instead of the overloaded
version. It requires overloads to add `teardown_tag` into the signature
so that the rules for argument dependent lookup can find the
right function. Improve documentation of teardown requirements

The documentation is updated to clearly explain the need for including
<beast/websocket/ssl.hpp> to use SSL streams with WebSocket.

The default implementations of teardown and async_teardown now use
static_assert to alert the user of improper usage, with comments
providing guidance for resolving the error.
2016-07-06 13:36:14 -04:00
Vinnie Falco 6397025435 Remove deprecated example http::stream wrapper 2016-07-06 13:36:12 -04:00
Vinnie Falco 2a448065da Simplify HTTP crawler example 2016-07-06 13:36:00 -04:00
Vinnie Falco 5c7130e4fd Fixes and simplifications to HTTP example server:
The example HTTP server is updated to provide the correct MIME-type.
It no longer uses the now-deprecated http::stream class, since that
implementation does not provide flow control. A new example async_write
function is provided in the asynchronous server for managing the
lifetime of a message sent asynchronously.

The logging is thread-safe, and a bug causing connections to
malfunction is fixed.
2016-07-06 13:36:00 -04:00
Vinnie Falco bbad20c66f Qualify some calls:
This fixes a problem where a call to read() is ambiguous because
the argument list contains objects from both boost::asio and
beast::http.

Users invoking read may need to do so fully qualified, by writing:
    beast::http::read(...);
2016-07-06 13:35:57 -04:00
Vinnie Falco c4c8a620c8 Initialize Writer in prepare:
Writer requires a call to Writer::init to call content_length. This
changes prepare to correctly call init. A consequences is that
prepare can now throw unexpectedly for user-defined writers that
can fail their initialization.
2016-06-20 11:12:26 -04:00
Vinnie Falco 999e2fa031 Set Beast version to 1.0.0-b6 2016-06-03 11:49:43 -04:00
Vinnie Falco c060d08767 rfc7230 compliance, limits, and tests for basic_parser_v1:
New parser set_option function for controlling independent size limits
on headers and body. By default request and response parsers are set up
with reasonable limits to prevent resource exhaustion attacks.

* Parser adheres strictly to rfc7230
* Increased test coverage
* Headers and body maximum size limit options
2016-06-03 11:49:11 -04:00
The Gitter Badger 27ca1b2698 Add Gitter badge 2016-06-03 11:43:56 -04:00
Vinnie Falco 50b5dab5df Rename concept to DynamicBuffer (API change):
Conform to the Networking TS by renaming the Streambuf concept
to DynamicBuffer in all places. Values of types meeting the
requirements of DynamicBuffer are renamed to dynabuf.

See:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4478.html#requirements.dynamic_buffers

* Headers renamed
* Formal parameter names renamed
* Template argument types renamed
* Documentation updated
2016-05-28 18:39:18 -04:00
Vinnie Falco 8afdcb9e9f Add message swap members and free functions 2016-05-28 18:39:18 -04:00
Vinnie Falco 7e8f5401b2 Add HTTP field value parsers:
ext_list:
    Iterable container of comma separated extensions, where each extension
    is a token followed an optional list of semicolon delimited parameters,
    with each parameter consisting of a name / value pair. The value can
    be a token or quoted-string.

param_list:
    Iterable container of semicolon delimited parameters, where each parameter
    is a name / value pair. The value can be a token or quoted-string.

token_list
    Iterable container of comma delimited tokens.

* Remove obsolete rfc2616 functions

* Refactor and consolidate case-insensitive string helpers
2016-05-28 18:39:17 -04:00
Vinnie Falco 5a0a47cbae Tidy up use of GENERATING_DOCS 2016-05-28 07:59:34 -04:00
Vinnie Falco bc2642f423 Use beast::error_code instead of nested types 2016-05-28 07:59:19 -04:00