Commit Graph

95 Commits

Author SHA1 Message Date
Vinnie Falco df8d306909 Tidy up documentation:
fix #135

* Fix broken references
* Move doc debug headers to extras/
* Add rfc7230 utility classes to quick reference
2016-10-20 17:22:37 -04:00
Vinnie Falco 47105f8454 Tidy up basic_headers for documentation 2016-10-20 17:22:36 -04:00
Vinnie Falco ada1f60e3e Refine message class hierarchy:
Two new objects, request_headers and response_headers,
represent the portion of HTTP messages excluding the body.
2016-10-20 17:22:36 -04:00
Vinnie Falco cf43f516d2 Rework HTTP concepts (API Change):
fix #139, fix #140

* Writer uses write instead of operator()
* Refactor traits to use void_t
* Remove is_ReadableBody, is_WritableBody
* Add has_reader, has_writer, is_Reader, is_Writer
* More friendly compile errors on failed concept checks
2016-10-17 11:11:57 -04:00
Vinnie Falco 8a261ca923 HTTP Reader (API Change):
fix #114, fix #117, fix #136

* Added init() to Reader requirements
* Reader must be nothrow constructible
* Reader is now constructed right before reading the body
  - The message passed on construction is filled in
2016-10-17 11:11:57 -04:00
Vinnie Falco 183055a74c Parser callbacks may not throw (API Change) 2016-10-17 11:11:56 -04:00
Vinnie Falco ebebe52612 Add basic_streambuf::alloc_size
fix #133
2016-10-17 11:11:56 -04:00
Vinnie Falco c9cd171c19 Fix basic_streambuf::capacity 2016-10-17 11:11:56 -04:00
Vinnie Falco 0eb0e485c3 Tidying:
fix #85

* Remove unnecessary boost/system includes
* Remove unused headers_type from write_preparation
* Use braced-init style construction
* handler_alloc doc update
2016-10-17 11:11:51 -04:00
Vinnie Falco 01f939d68e Set version to 1.0.0-b16 2016-10-14 16:14:05 -04:00
Vinnie Falco 14d7f8d362 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.
2016-10-14 14:12:43 -04:00
Vinnie Falco d81234435f Add pause option to on_headers interface:
* on_headers returns enum body_what
* body_what::pause lets caller receive headers during the parse
2016-10-14 14:12:42 -04:00
Vinnie Falco c59bd53f48 Improve first line serialization 2016-10-14 14:12:42 -04:00
Vinnie Falco 78ff20b005 Constrain parser_v1 constructor 2016-10-14 14:12:42 -04:00
Vinnie Falco 2765a67594 Refine Parser concept:
* Parser is not HTTP-specific
* parse algorithms are in their own header
* Update documentation
2016-10-14 14:12:41 -04:00
Vinnie Falco c329d33c4b Fix on_headers called twice from basic_parser_v1 2016-10-14 14:08:58 -04:00
Vinnie Falco 90cec54524 Make auto_fragment a boolean option 2016-10-14 14:08:57 -04:00
Vinnie Falco 03642fb585 Rename to write_buffer_size 2016-10-14 14:08:57 -04:00
Vinnie Falco 0ca8964fe0 Frame processing routines are member functions 2016-10-14 14:08:57 -04:00
Vinnie Falco d99dfb38de Make value optional in param-list 2016-10-14 14:08:56 -04:00
Vinnie Falco 325f579a1d Set version to 1.0.0-b15 2016-10-08 01:30:15 -04:00
Radoslaw Zarzynski c54762ae1a 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".
2016-10-08 01:30:10 -04:00
Vinnie Falco 60e637bd69 Tidy up error types:
* Restructure header material
* Clean up namespace type injections
* Remove extraneous 'success' constants
2016-10-08 01:30:10 -04:00
Vinnie Falco d54d597f76 Tidy up DynamicBuffer requirements 2016-10-08 01:30:10 -04:00
Vinnie Falco 38af0f73d8 Fix message_v1 constructor 2016-10-08 01:30:10 -04:00
Vinnie Falco 076456bdcc rfc7230 section 3.3.2 compliance 2016-10-08 01:30:10 -04:00
Vinnie Falco 70b8555cdc Set version to 1.0.0-b14 2016-09-29 13:03:53 -04:00
Vinnie Falco b4a8342795 Update and tidy documentation 2016-09-29 13:03:36 -04:00
Vinnie Falco 4abb43edc0 Use BOOST_ASSERT 2016-09-29 13:03:35 -04:00
Vinnie Falco b5bffee130 Don't rely on undefined behavior 2016-09-29 13:03:34 -04:00
Vinnie Falco 8ee7a21a88 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
2016-09-29 13:03:34 -04:00
Vinnie Falco 4c7065a80a Add missing rebind to handler_alloc 2016-09-29 13:03:32 -04:00
Vinnie Falco 2f9a8440c2 Set version to 1.0.0-b13 2016-09-02 16:56:33 -04:00
Vinnie Falco 241795cd73 Set version to 1.0.0-b12 2016-08-29 15:07:23 -04:00
Vinnie Falco d263d4d449 Set version to 1.0.0-b11 2016-08-26 13:06:51 -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 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 3ff56eb071 Set version to 1.0.0-b10 2016-08-12 21:02:44 -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
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 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