Commit Graph
1234 Commits
Author SHA1 Message Date
Vinnie Falco ccee1392eb Documentation work 2017-06-09 13:41:03 -07:00
Vinnie Falco 13c64e3439 Set version to 51 2017-06-09 13:33:06 -07:00
Vinnie Falco cafc8e25c2 Fix infinite loop in basic_parser
fix #452
2017-06-09 13:33:03 -07:00
Vinnie Falco dc4b69d8bc Add construct, destroy to handler_alloc
fix #432
2017-06-08 19:36:51 -07:00
Vinnie Falco 58c2739115 multi_buffer implementation change (API Change):
fix #440

WARNING

multi_buffer constructor now takes a maximum size instead of the
"allocation size". This is a breaking change. The allocation size
feature is removed. To update calling code, remove the allocation
size parameter from call sites.

* multi_buffer now uses a geometric growth algorithm for better performance.
2017-06-08 19:36:51 -07:00
Vinnie Falco dd7f5c03f8 DynamicBuffer benchmarks
fix #441
2017-06-08 19:36:51 -07:00
Vinnie Falco 1c4811b821 Use BOOST_STRINGIZE
fix #384
2017-06-08 06:42:17 -07:00
Vinnie Falco 31051ac51b Use BOOST_FALLTHROUGH
fix #437
2017-06-08 06:41:27 -07:00
Vinnie Falco 8f2430be64 Documentation work 2017-06-08 05:47:01 -07:00
Niklas Schnelle eb35b9212a Fix file_body::get() not setting the more flag correctly
The check for more data actually checked if the end of data was reached
so it was logically inverted.

This fixes #434
2017-06-08 05:47:01 -07:00
Vinnie Falco 566244adc1 Tidy up file_body
fix #439
2017-06-08 05:44:09 -07:00
Vinnie Falco 53cbeea596 Tune up static_buffer (API Change):
The static buffer is updated:

* reset() is no longer a member. Use b.consume(b.size()) instead.

* Simplified implementaton, uses asio instead of custom types

* Better stream performance: consuming the input makes room
  available in the output. This class is now suitable for
  HTTP reads.

These changes permit the static_buffer wrapper to adapt a user
memory buffer if desired, including a stack based array.
The static_buffer_n class may also be used for this purpose,
it comes with its own storage.
2017-06-07 19:21:33 -07:00
Vinnie Falco 20c59b7e22 Fix operator<< for header 2017-06-07 19:21:32 -07:00
Vinnie Falco a2c1117fc0 Set version to 50 2017-06-07 18:18:59 -07:00
Vinnie Falco 6045b746e3 http read_some, async_read_some don't return bytes (API Change):
fix #431, fix #430

The read_some and async_read_some HTTP operations no longer
return the number of bytes that the caller should consume.
Instead, the bytes are automatically removed from the dynamic
buffer as indicated by the parser.
2017-06-07 18:18:56 -07:00
Vinnie Falco 4df68852a7 Fix chunk header parsing
fix #431, fix #430
2017-06-07 18:18:56 -07:00
Vinnie Falco 36bf32bc45 Fix test::pipe read_size 2017-06-07 18:18:56 -07:00
Vinnie Falco bf69ce1683 Fix chunk delimiter parsing 2017-06-07 18:18:56 -07:00
Vinnie Falco 0c6b6b1a00 Add missing handler_alloc nested types
fix #432
2017-06-07 18:18:56 -07:00
Vinnie Falco a06b8f9be3 Tidy up message javadoc 2017-06-07 18:18:56 -07:00
Vinnie Falco 3bd82600a0 Remove obsolete serializer allocator (API Change) 2017-06-07 18:18:56 -07:00
Vinnie Falco 001c97950c Remove message free functions (API Change) 2017-06-07 18:18:55 -07:00
Vinnie Falco 745876b9bf Remove message connection settings (API Change) 2017-06-07 18:18:55 -07:00
Vinnie Falco bcf2c33d47 Body documentation work 2017-06-07 18:18:55 -07:00
Vinnie Falco 1e303b0cf6 Fields concept work 2017-06-07 18:18:55 -07:00
Vinnie Falco 9d0464a946 Tidy up basic_fields, header, and concepts 2017-06-07 18:18:55 -07:00
Vinnie Falco 3ba81b5474 Use field in basic_parser 2017-06-07 18:18:54 -07:00
Vinnie Falco b5f6cc1724 Use field in basic_fields and call sites 2017-06-07 18:18:54 -07:00
Vinnie Falco cfd6d146a8 Documentation reference tidy 2017-06-07 18:18:54 -07:00
Vinnie Falco 2adc80aa6a Protect basic_fields special members (API Change) 2017-06-07 18:18:54 -07:00
Vinnie Falco d55b079321 Fix basic_fields allocator awareness 2017-06-07 18:18:54 -07:00
Vinnie Falco d8febdae76 Documentation work 2017-06-07 18:18:50 -07:00
Vinnie Falco 485a6e55ee Refactor prepare (API Change) 2017-06-06 13:25:44 -07:00
Vinnie Falco 9fd307178f Derive header from Fields (API Change) 2017-06-06 13:25:43 -07:00
Vinnie Falco 8ad26b8f5d Use allocator more in basic_fields
Fix #392
2017-06-06 13:25:43 -07:00
Vinnie Falco 0071039d7f Add verb to on_request for parsers (API Change) 2017-06-06 13:25:43 -07:00
Vinnie Falco 74f6cbb117 Add field enumeration 2017-06-06 13:25:43 -07:00
Vinnie Falco be0d74f2aa Documentation fixes 2017-06-05 16:09:38 -07:00
Vinnie Falco 054ac40192 Remove header_parser (API Change) 2017-06-05 16:09:38 -07:00
Vinnie Falco a007eba09c parser is constructible from other body types 2017-06-05 16:09:38 -07:00
Vinnie Falco d89809fb45 Documentation work (buffer_body) 2017-06-05 16:09:37 -07:00
Vinnie Falco ac5bc4f62c Set version to 49 2017-06-05 16:04:41 -07:00
Vinnie Falco af47128f0b Documentation work 2017-06-05 16:04:35 -07:00
Vinnie Falco a1848f09ce Add HEAD request example 2017-06-04 17:26:21 -07:00
Vinnie Falco ddfbfbf172 Use <iosfwd> instead of <ostream> 2017-06-04 17:26:21 -07:00
Vinnie Falco e67c0abe79 Refactor header status, reason, and target (API Change):
* header::result is a family of functions to replace header::status

* header interface now uses status enum and also ints

* reason-phrase is no longer stored unless the user explicitly
  requests it.

* When serializing, the standard reason is used for the
  corresponding status code unless the user has changed it.
2017-06-04 17:26:20 -07:00
Vinnie Falco 60f044aff0 Tidy up empty_body writer error 2017-06-04 15:05:23 -07:00
Vinnie Falco 7d267f46b0 Canonicalize string_view parameter types 2017-06-04 14:51:41 -07:00
Vinnie Falco ac175cb694 Refactor method and verb (API Change):
The verb interfaces now use verb::unknown instead of
boost::optional<verb> == boost::none to indicate that
the request-method is an unrecognized string.

The http::header interface is modified to focus more on the
verb enum rather than the string. For recognized verbs, the
implementation stores an integer instead of the string.
Unknown verbs are still stored as strings.

* header::method now returns a verb
* header::method_string returns the method text
2017-06-04 14:51:41 -07:00
Vinnie Falco e18efedcd1 Documentation work 2017-06-04 14:51:40 -07:00