Vinnie Falco
18ce21d5c9
Translate some win32 errors to net error codes
...
fix #1815
2020-02-04 19:42:06 +01:00
Richard Hodges
7701bf8738
moved-from container with unequal allocator will not be modified:
...
Affects:
- flat_buffer
- multi_buffer
- http::fields
fixes #1832
closes #1834
2020-02-04 18:36:53 +01:00
Richard Hodges
6d10adf936
fix erase field
...
fixes #1828
closes #1829
2020-02-04 18:36:50 +01:00
Richard Hodges
3d168c0336
file body reports short_read on eof
...
fixes #1818
fixes #1815
close #1821
2020-01-28 10:24:44 +01:00
Mika Fischer
a6155ae9bf
Add accessor function to File member of basic_file_body:
...
fix #1260
close #1814
2020-01-23 16:24:46 +01:00
Mika Fischer
0abb38a310
file_win32 bodies respect http::serializer::split
...
fix #1786 , close #1788
2019-12-23 10:51:22 -08: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
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
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
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
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
d5cd3e829b
Don't over-allocate in http::basic_fields
2019-07-01 12:49:03 -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
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
f10dc38ae6
Replace uses of net::coroutine with asio::coroutine
...
`asio::coroutine` is an extension, which is not part of
the Networking TS, so the `net` alias is not appropriate in this case.
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com >
2019-06-19 17:53:35 +02:00
Damian Jarek
a0d5baf22a
Improve performance of http::string_to_verb
...
`operator==` performs better than the hand-written comparison routine.
fix #1636
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com >
2019-06-19 17:53:35 +02:00
Damian Jarek
da61b4e52c
Move char_buffer into a separate file
...
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com >
2019-06-19 17:53:34 +02:00
Damian Jarek
d5f5f1467f
Enable split compilation in http::basic_fields
...
Moved functions,that are independent of template argument, into
an *.ipp file.
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com >
2019-06-19 17:53:33 +02:00
Damian Jarek
833243d948
Remove the use of static_string from http::fields
...
The `temporary_buffer<A>` class template replaces the use of
`static_string` in `http::fields`, simplifying `set_chunked_impl` and
`set_keep_alive_impl`.
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com >
2019-06-04 15:31:18 +02:00
Damian Jarek
76842d637f
Reduce the number of instantiations of filter_token_list
...
Not using lambdas in this case reduced the number of instantiations of
the algorithm by a factor of 4x at no (observable) runtime cost.
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com >
2019-06-03 18:05:52 +02:00
Vinnie Falco
be460675bc
Preserve operation_aborted on partial message
2019-05-20 15:34:22 +02:00
Damian Jarek
c254b4fcfb
Remove uses of the deprecated buffers function
...
Fix: 1607
Close: 1608
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com >
2019-05-19 22:32:37 +02:00
Damian Jarek
45aaf22acd
Relax requirements for vector_body:
...
fix : #1567
std::byte is not an arithmetic type, which caused compilation to fail
when it was used in vector_body.
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com >
2019-04-20 10:19:31 -07:00
Vinnie Falco
71de05d3cc
More std::string_view fixes
2019-04-18 16:15:42 -07:00
Damian Jarek
2cfe3ba1b8
Replace static_string in parser
...
close #1574
This change yields a modest performance improment of 1-2% by replacing
the exception-based handling of buffer overflow with one based on
regular conditional checks.
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com >
2019-04-15 08:21:48 -07:00
Damian Jarek
b7a8fb5178
Fix compilation on MSVC with std::string_view
...
close #1573
std::string_view::iterator is not necessarily a raw pointer.
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com >
2019-04-15 08:21:48 -07:00
Mohamed El Housseine
ebe52537ea
Set parser status and flags even if body_limit_ has been reached
...
close #1556
2019-04-08 17:14:46 -07:00
Denis Glazachev
058294e908
Fix http::message constructor constraint
2019-03-30 14:14:59 -07:00
Denis Glazachev
24ccdd243a
Fix some typos
2019-03-30 11:12:04 -07:00
Vinnie Falco
a7faf03694
Fix http::message constructor constraint
2019-03-29 20:42:44 -07:00
Vinnie Falco
51db4d491a
basic_parser::content_length is stable (API Change):
...
fix #1375
* The value returned from `basic_parser::content_length`
no longer changes as the body of the message is received.
Actions Required:
* Call `basic_parser::content_length_remaining` instead
of `basic_parser::content_length`.
2019-03-29 15:05:30 -07:00
Damian Jarek
5a0b4d7ebe
More split compilation in HTTP
...
close #1541
- Remove unused private functions: `skip_ows_rev`, `skip_obs_fold`.
- Enable split compilation in `http/detail/rfc7230.hpp`.
- More split compilation in `basic_parser`.
- Remove some unnecessary includes.
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com >
2019-03-24 11:05:24 -07:00
Vinnie Falco
b7c3c1eb1a
Fix file_win32_write_op async initiation
2019-03-12 18:07:19 -07:00
Damian Jarek
dc52df351a
Enable more split compilation in websocket and http
...
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com >
2019-03-10 13:23:22 -07:00
Vinnie Falco
45353a7f04
handler_ptr is deprecated (API Change):
...
* `handler_ptr` is deprecated and should not be used.
Actions Required:
* Replace use of `handler_ptr` with `stable_async_base`
and `allocate_stable`.
2019-03-06 10:38:08 -08:00
Vinnie Falco
e073a9e7fc
Tidy up docs
2019-03-05 20:15:07 -08:00
Vinnie Falco
9f2b0ce1db
Rename to buffer_bytes
2019-03-05 11:09:53 -08:00
Vinnie Falco
6ccdcdf51d
buffer_size is in buffer_traits.hpp
2019-03-05 11:09:50 -08:00
Vinnie Falco
8e2620e2b1
Doc tidy
2019-03-05 08:00:14 -08:00
Vinnie Falco
0e4e7ff370
~basic_parser is virtual
2019-03-03 19:31:52 -08:00
Vinnie Falco
1432d336be
Move parser definitions to .ipp
2019-03-02 09:13:08 -08:00
Vinnie Falco
edf5b7cd03
Fix HTTP parser static string calculation
2019-03-02 09:13:08 -08:00
Damian Jarek
c7a7d16992
Allow the use of string_body and vector_body with -fno-exceptions
...
`string_body` and `vector_body` will no longer translate all exceptions
to "buffer_overflow" error code. `buffer_overflow` error can now only
occur if the Body's max_size() is exceeded.
Changes required:
Code that relies on exceptions thrown from value_type's reserve/resize
being translated into an error code must implement a mechanism to catch
the exception.
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com >
2019-03-01 14:50:50 -08:00
Vinnie Falco
8c53abe6e5
Support -fno-exceptions
2019-03-01 13:52:50 -08:00
Vinnie Falco
00487f1de6
Reusing an HTTP parser returns an error
2019-02-28 10:27:43 -08:00
Vinnie Falco
7953ac281f
Pass references as pointers to async_initiate
2019-02-26 07:21:05 -08:00