Commit Graph

521 Commits

Author SHA1 Message Date
Vinnie Falco
ec37172ee6 Set version to 80 2017-07-20 08:15:31 -07:00
Vinnie Falco
ff15cf8688 Refactor chunked-encoding serialization:
New buffer sequence classes are provided to allow full
control over the serialization of chunk-encoded message
payloads:

* chunk_header

    A ConstBufferSequence representing the chunk header.
    It includes a hexadecimal-encoded size, an optional
    set of chunk extensions, and the trailing CRLF
    required to denote the end of the chunk header.

    This allows the caller to manually serialize the chunk
    body in one or more calls to a stream output function.
    The caller must also output an object of type `chunk_crlf`
    to the stream to indicate the end of the chunk body.

* chunk_crlf

    A small ConstBufferSequence that simply represents
    the two character sequence "\r\n" (CRLF). This is needed
    for the case where the caller wants to output a chunk
    body as a series of buffers (i.e. "chunking a chunk").

* chunk_body

    A ConstBufferSequence representing a complete chunk.
    This includes the size, an optional set of chunk extensions,
    a caller provided buffer containing the body, and the
    required CRLF that follows.

* chunk_final

    A ConstBufferSequence representing a final chunk. It
    includes an optional set of caller-provided field trailers

* chunk_extensions

    A container for building a set of chunk extensions to use
    during serialization. The use of the container is optional,
    callers may provide their own buffer containing a correctly
    formatted set of chunk extensions, or they may use their
    own convenience container which meets the requirements.

The basic_fields container is modified to allow construction
outside the context of a message. The container can be used
to provide trailers to `chunk_final`.

Actions Required:

* Remove references to ChunkDecorators. Use the new chunk-encoding
  buffer sequences to manually produce a chunked payload body in
  the case where control over the chunk-extensions and/or trailers
  is required.
2017-07-20 08:15:31 -07:00
Vinnie Falco
02de2e5cbb Shrink chunk header buffer sequence size 2017-07-20 08:15:31 -07:00
Vinnie Falco
e9c44030e4 buffers_ref is Assignable 2017-07-20 08:15:31 -07:00
Vinnie Falco
6cec63fc9e Add basic_file_body.hpp 2017-07-20 08:15:31 -07:00
Vinnie Falco
42b81fb3a0 Remove unused file_path 2017-07-20 08:15:30 -07:00
Vinnie Falco
9bfb5374f1 Shrink buffer_prefix_view 2017-07-20 08:15:30 -07:00
Vinnie Falco
9ffb8e0f0f Add basic_dynamic_body.hpp
fix #606
2017-07-20 08:15:30 -07:00
Vinnie Falco
b65f0abd50 Javadoc tidying 2017-07-20 08:15:30 -07:00
Vinnie Falco
ca297a3980 Set version to 79 2017-07-20 08:15:30 -07:00
Vinnie Falco
b8867abf6d Remove spurious fallthrough guidance 2017-07-20 08:15:30 -07:00
Vinnie Falco
15cc4c458b Set version to 78
Signed-off-by: Vinnie Falco <vinnie.falco@gmail.com>
2017-07-20 08:15:30 -07:00
Vinnie Falco
93ae544f9c Tidy up file_posix unused variable 2017-07-20 08:15:30 -07:00
Vinnie Falco
a49b442969 Add Boost.Locale utf8 benchmark comparison 2017-07-20 08:15:30 -07:00
Vinnie Falco
5788ed2574 Remove string_view_body
Actions Required:

* Use span_body<char> instead of string_view_body
2017-07-20 08:15:30 -07:00
Vinnie Falco
83cef67fb4 Header file tidying 2017-07-20 08:15:30 -07:00
Vinnie Falco
ff05be32af Fix warning in zlib 2017-07-20 08:15:30 -07:00
Vinnie Falco
6a46e48424 Add message keep_alive, chunked, content_length members 2017-07-20 08:15:30 -07:00
Vinnie Falco
aa473a6da4 Fix spurious uninitialized warning 2017-07-20 08:15:30 -07:00
Vinnie Falco
69b61656dd Use make_unique_noinit
fix #605
2017-07-20 08:15:30 -07:00
Vinnie Falco
1f41c124c0 Documentation work 2017-07-20 08:15:30 -07:00
Vinnie Falco
37110f2d04 Add span_body 2017-07-20 08:15:30 -07:00
Vinnie Falco
c9908eada0 Tidy up includes and javadocs 2017-07-20 08:15:30 -07:00
Vinnie Falco
80eb5af584 Add span 2017-07-20 08:15:30 -07:00
Vinnie Falco
e1de01ad13 Add vector_body
fix #580
2017-07-20 08:15:30 -07:00
Vinnie Falco
c6d7fa185b Tidy up basic_string_body
fix #580
2017-07-20 08:15:30 -07:00
Vinnie Falco
222eca839a Set version to 77 2017-07-20 08:15:30 -07:00
Vinnie Falco
eb4a4d41f0 file_posix works without large file support
fix #632
2017-07-20 08:15:30 -07:00
Vinnie Falco
8f43bcc197 Set version to 76 2017-07-20 08:15:30 -07:00
Vinnie Falco
152720efaf Disable SSE4.2 optimizations 2017-07-20 08:15:30 -07:00
Vinnie Falco
a00ce1209b Fix parse illegal characters in obs-fold 2017-07-20 08:15:30 -07:00
Vinnie Falco
f657057c49 Add file_body_win32:
basic_file_body is specialized for file_win32:

When serializing file bodies to stream sockets on Windows,
the native platform function ::TransmitFile is used, improving
performance.
2017-07-20 08:15:30 -07:00
Vinnie Falco
cc198db10e serializing file_body is not const 2017-07-20 08:15:30 -07:00
Vinnie Falco
e06a055503 BodyReader, BodyWriter use two-phase init (API Change):
These types now perform error-based initialization in
a separate init() functions instead of in the constructor.

Actions Required:

* Modify instances of user-defined BodyReader and BodyWriter
  types to perfrom two-phase initialization, as per the
  updated documented type requirements.
2017-07-20 08:15:30 -07:00
Vinnie Falco
8a3df73ffc Serializer members are not const 2017-07-20 08:15:30 -07:00
Vinnie Falco
83403570bd Rename to serializer::keep_alive (API Change):
The serializer member is renamed to keep_alive()

Actions Required:

* Use serializer::keep_alive instead of serializer::close and
  take the logical NOT of the return value.
2017-07-20 08:15:30 -07:00
Vinnie Falco
a369f7d9ff Add serializer::chunked 2017-07-20 08:15:30 -07:00
Vinnie Falco
c52ddea11d Add serializer::get 2017-07-20 08:15:30 -07:00
Vinnie Falco
db59a92011 BodyReader may construct from a non-const message
fix #619
2017-07-20 08:15:30 -07:00
Vinnie Falco
0324dc371f Use Boost.Config 2017-07-20 08:15:30 -07:00
Vinnie Falco
f65a611b85 Always go through write_some:
HTTP stream serialization algorithms always go
through write_some or async_write some.
2017-07-20 08:15:30 -07:00
Vinnie Falco
ae7270463d Set version to 75 2017-07-20 08:15:30 -07:00
Vinnie Falco
5ed1c98037 Doc tidying 2017-07-20 08:15:30 -07:00
octopus-prime
288f363fa6 Using SSE4.2 intrinsics in basic_parser if available
fix #622
2017-07-20 08:15:30 -07:00
Vinnie Falco
731164bec2 Add serializer::limit 2017-07-20 08:15:30 -07:00
Vinnie Falco
d750364d6f Shrink serializer buffers using buffers_ref 2017-07-20 08:15:30 -07:00
Vinnie Falco
bb0e86ac01 Tidy up BEAST_NO_BIG_VARIANTS 2017-07-20 08:15:30 -07:00
Vinnie Falco
8ee911f632 Construct buffer_prefix_view in-place 2017-07-20 08:15:30 -07:00
Vinnie Falco
783c52b025 Set version to 74 2017-07-20 08:15:30 -07:00
Vinnie Falco
eec5f1d8b6 Add file_posix 2017-07-20 08:15:30 -07:00