Commit Graph
134 Commits
Author SHA1 Message Date
Vinnie Falco 6732af5822 Add basic_streambuf::alloc_size
fix #133
2017-07-20 08:12:13 -07:00
Vinnie Falco 92e7afb801 Fix basic_streambuf::capacity 2017-07-20 08:12:13 -07:00
Vinnie Falco 52be0dd06e Tidying:
fix #85

* Remove unnecessary boost/system includes
* Remove unused headers_type from write_preparation
* Use braced-init style construction
* handler_alloc doc update
2017-07-20 08:12:13 -07:00
Evgeniy 8a64367d98 Change implicit_value to default_value 2017-07-20 08:12:13 -07:00
Vinnie Falco 8918b2aceb Set version to 1.0.0-b16 2017-07-20 08:12:13 -07:00
Vinnie Falco bfaa4d2530 Fix websocket failure tests 2017-07-20 08:12:13 -07:00
Vinnie Falco 14f13cc74a Fix Writer exemplar in docs 2017-07-20 08:12:13 -07:00
Vinnie Falco aed6c0e288 Relax ForwardIterator requirements in FieldSequence 2017-07-20 08:12:13 -07:00
Vinnie Falco 0eb3605232 Refactor base_parser_v1 callback traits:
When the derived class provides a member function with the
corresponding callback name, but the signature is different,
a compile error will be generated instead of silently ignoring
the member function.
2017-07-20 08:12:13 -07:00
Vinnie Falco 2106f364f6 Add pause option to on_headers interface:
* on_headers returns enum body_what
* body_what::pause lets caller receive headers during the parse
2017-07-20 08:12:12 -07:00
Vinnie Falco ce18124566 Improve first line serialization 2017-07-20 08:12:12 -07:00
Vinnie Falco a26a8ea433 Constrain parser_v1 constructor 2017-07-20 08:12:12 -07:00
Vinnie Falco bca43529b0 Refine Parser concept:
* Parser is not HTTP-specific
* parse algorithms are in their own header
* Update documentation
2017-07-20 08:12:12 -07:00
Vinnie Falco 18eeddfab6 Fix on_headers called twice from basic_parser_v1 2017-07-20 08:12:12 -07:00
Vinnie Falco 113ecb0c34 Put back missing Design section in docs 2017-07-20 08:12:12 -07:00
Vinnie Falco 5855b34d6e Make auto_fragment a boolean option 2017-07-20 08:12:12 -07:00
Vinnie Falco 1156b483c4 Rename to write_buffer_size 2017-07-20 08:12:12 -07:00
Vinnie Falco 74f9211366 Frame processing routines are member functions 2017-07-20 08:12:12 -07:00
Vinnie Falco fbc8ddbc81 Make value optional in param-list 2017-07-20 08:12:12 -07:00
Vinnie Falco ad966d6217 Set version to 1.0.0-b15 2017-07-20 08:12:12 -07:00
Radoslaw Zarzynski bc665ee1ec Fix handling empty HTTP headers in parser_v1.hpp
This patch rectifies flush() of beast::http::parser_v1
to properly handle the case when an HTTP header has
empty value.

Without the fix an empty-valued HTTP header is being
concatenated with the header directly following it.
This situation can be replicated using eg. curl:

  curl <url> -H "X-First;" -H "X-Second: bla"

What Beast's client would see is a single header named
as "X-FirstX-Second".
2017-07-20 08:12:12 -07:00
Vinnie Falco 843d7a5a9c Regression test for empty headers 2017-07-20 08:12:12 -07:00
Vinnie Falco 6b0b016b21 Tidy up error types:
* Restructure header material
* Clean up namespace type injections
* Remove extraneous 'success' constants
2017-07-20 08:12:12 -07:00
Vinnie Falco f2a283ed10 Tidy up DynamicBuffer requirements 2017-07-20 08:12:12 -07:00
Vinnie Falco 19c4ae3140 Fix doc reference section 2017-07-20 08:12:12 -07:00
Vinnie Falco 9135cdff1a Fix message_v1 constructor 2017-07-20 08:12:12 -07:00
Vinnie Falco e8527babeb Add Secure WebSocket example 2017-07-20 08:12:12 -07:00
Vinnie Falco 2ad5223d80 Add HTTPS example 2017-07-20 08:12:12 -07:00
Vinnie Falco 62bd4bb13f rfc7230 section 3.3.2 compliance 2017-07-20 08:12:12 -07:00
Vinnie Falco c5bd32e39d Use bin/sh 2017-07-20 08:12:12 -07:00
Vinnie Falco 252c2c620f Update README.md for CppCon 2016 presentation 2017-07-20 08:12:12 -07:00
Vinnie Falco 0a347f2b25 Set version to 1.0.0-b14 2017-07-20 08:12:12 -07:00
Vinnie Falco 9cc65c8850 Update and tidy documentation 2017-07-20 08:12:12 -07:00
Vinnie Falco 0821ca6e11 Update README.md 2017-07-20 08:12:09 -07:00
Vinnie Falco dff2751c07 Use BOOST_ASSERT 2017-07-20 08:12:09 -07:00
Vinnie Falco 58d3ea6548 Don't rely on undefined behavior 2017-07-20 08:12:09 -07:00
Vinnie Falco 41a8342d3b Better WebSocket decorator:
* Caller provided type can omit one or both overloads
* Omitted overloads yield default behavior
* Documentation no longer refers to a detail type
2017-07-20 08:12:09 -07:00
Evgeniy 42073a925a Update build scripts for MSVC, MinGW 2017-07-20 08:12:09 -07:00
Evgeniy d5d8e2fcd2 Fix error handling in server examples 2017-07-20 08:12:09 -07:00
Vinnie Falco 0c0b2f2545 Add missing rebind to handler_alloc 2017-07-20 08:12:09 -07:00
Vinnie Falco dfea8ff266 Set version to 1.0.0-b13 2017-07-20 08:12:09 -07:00
Vinnie Falco f8bb91862e Better dstream:
* non-Windows dstream is a simple reference alias
* dstream constructor takes a target ostream argument
* dstream inherits the unitbuf setting of the target stream
2017-07-20 08:12:09 -07:00
Vinnie Falco af46a1162a Tidy up CMakeLists 2017-07-20 08:12:09 -07:00
Vinnie Falco a443be208c Remove bin and bin64 directories:
These directories are removed, to make it easier for developers
to delete the entire directory contents when rebuilding CMake targets
after a configuration change.
2017-07-20 08:12:09 -07:00
Vinnie Falco fda1493565 Set version to 1.0.0-b12 2017-07-20 08:12:09 -07:00
Vinnie Falco 59cb3ee098 Use -p to print suites from unit test main 2017-07-20 08:12:09 -07:00
Vinnie Falco 28cabc5e28 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;
    ```
2017-07-20 08:12:09 -07:00
Vinnie Falco f144619e7c Fix unit test runner to output all case names:
Also fixes a bug where suite::log was incorrectly flushed.
2017-07-20 08:12:09 -07:00
Vinnie Falco 4bb0b9d0d9 Tidy up whitespace 2017-07-20 08:12:09 -07:00
Vinnie Falco 5f8f6c0b75 Update README, rename CHANGELOG 2017-07-20 08:12:09 -07:00