Commit Graph

74 Commits

Author SHA1 Message Date
Vinnie Falco
e8be3fd7d3 New HTTP interfaces (API Change):
fix #123
fix #154
fix #265

This completely replaces the HTTP parser used to read and
parse incoming messages. The new version is faster than
the old one, and written in fewer lines. A summary of
changes:

* parse and async_parse renamed to read and async_read

* basic_parser is optimized for linear buffers,
  use flat_streambuf for the best performance with these
  functions:

  - http::read
  - http::read_some
  - http::async_read
  - http::async_read_some

* The overloads of read() and async_read() which take
  just a header have been removed, since they would
  throw away important parse metadata.

* The derived class callbacks for basic_parser have
  been streamlined. All strings passed to callbacks
  are presented in their entirety, instead of being
  provided in pieces.

These changes allow use-cases that were previously
difficult or impossible, such as:

- Efficient relaying

- Late body type commitment

- Expect: 100-continue handling
2017-07-20 08:12:15 -07:00
Vinnie Falco
75b8e30a15 Add appveyor build script
Fix #75
2017-07-20 08:12:15 -07:00
Vinnie Falco
5bb5f62b9a Require Visual Studio 2015 Update 3 or later
fix #216
2017-07-20 08:12:15 -07:00
Sergey Lyubimov
3641521af7 Update CMake scripts for finding packages:
These changes require CMake version 3.7.2 or later.
2017-07-20 08:12:15 -07:00
Vinnie Falco
c5833e279c Fix badge markdown in README.md 2017-07-20 08:12:15 -07:00
Vinnie Falco
269ca3610a Update README.md for CppCast 2017 2017-07-20 08:12:14 -07:00
Vinnie Falco
c6dae58364 Update README.md example programs
fix #219
2017-07-20 08:12:14 -07:00
Denis Andrejew
753281959e Improve websocket example in README.md
fix #138

* Refactoring for clarity
2017-07-20 08:12:13 -07:00
Vinnie Falco
252c2c620f Update README.md for CppCon 2016 presentation 2017-07-20 08:12:12 -07:00
Vinnie Falco
0821ca6e11 Update README.md 2017-07-20 08:12:09 -07:00
Vinnie Falco
5f8f6c0b75 Update README, rename CHANGELOG 2017-07-20 08:12:09 -07:00
Keaton Okkonen
b7201be164 Update README.md (fix #62) 2017-07-20 08:12:09 -07:00
Vinnie Falco
796f20314c Update HTTP documentation (fix #61, #60, #59) 2017-07-20 08:12:09 -07:00
Vinnie Falco
2c4bdf933e Update documentation and images 2017-07-20 08:12:09 -07:00
Vinnie Falco
306cdf22d0 Update README.md for CppCon 2016 2017-07-20 08:12:07 -07:00
Jack Bond-Preston
d005b97c0b Fix to_string.hpp include path in example code 2017-07-20 08:12:07 -07:00
The Gitter Badger
e6d7ef35fc Add Gitter badge 2017-07-20 08:12:07 -07:00
Vinnie Falco
6c30ee1a98 Rename concept to DynamicBuffer (API change):
Conform to the Networking TS by renaming the Streambuf concept
to DynamicBuffer in all places. Values of types meeting the
requirements of DynamicBuffer are renamed to dynabuf.

See:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4478.html#requirements.dynamic_buffers

* Headers renamed
* Formal parameter names renamed
* Template argument types renamed
* Documentation updated
2017-07-20 08:12:07 -07:00
Nicholas Dudfield
4833dc3958 Travis CI updates:
* Run autobahn/valgrind tests when target branch in {master, develop}
* Add coveralls
* Show full stacktrace for usan (RIPD-1150)
* Manual launch of coverage (RIPD-1152)
* Use lldb on Darwin (RIPD-1152)
* Set defaults if not CI (RIPD-1152)
* Add autobahn result parser (RIPD-1147)
2017-07-20 08:12:07 -07:00
Vinnie Falco
039244cda4 WebSocket ping, fixes, coverage:
* Improve test coverage
* tests for invokable in composed ops

* Update documentation
* Add License badge to README
* Target Windows 7 SDK and later
* Make role_type private
* Remove extra unused masking functions
* Allow stream reuse / reconnect after failure
* Restructure logic of composed operations
* Allow 0 for read_message_max meaning no limit
* Respect keep alive when building HTTP responses
* Check version in upgrade request
* Response with 426 status on unsupported WebSocket version
* Remove unnecessary Sec-WebSocket-Key in HTTP responses
* Rename to mask_buffer_size

* Remove maybe_throw
* Add ping, async_ping, async_on_pong
* Add ping_op
* Add pong_op
* Fix crash in accept_op
* Fix suspend in close_op
* Fix read_frame_op logic
* Fix crash in read_op
* Fix races in echo sync and async echo servers
2017-07-20 08:12:07 -07:00
Vinnie Falco
c49cde844b New constructors for message:
The message class now behaves like a pair with respect to the construction
of the body and headers. Additional constructors allow construction of
just the body portion from a tuple, leaving the headers default
constructed.

Previous constructors are removed as they were a notational convenience
for assembling HTTP/1 requests and responses. They are not necessary
as this library aims at library writers and not end users.
2017-07-20 08:12:06 -07:00
Vinnie Falco
133e7a3b16 Improvements to increase code coverage:
* Don't include the test code in coverage reports
* Add test code for missing coverage

Other:

* Improve the README.md
* Fix warning in sha1_context
* Tidy up the examples use of namespaces
* Various fixes to documentation and javadocs
2017-07-20 08:12:06 -07:00
Nicholas Dudfield
cdde9b5ef1 Travis-CI additions:
* Address sanitizer target
* Code coverage target
* Results for codecov.io
2017-07-20 08:12:05 -07:00
Vinnie Falco
9a3a42a644 Truncate history, version 1.0.0-b2 2017-07-20 08:01:46 -07:00