Commit Graph

1930 Commits

Author SHA1 Message Date
Vinnie Falco
b0e52dd246 Refactor header and message constructors:
fix #581

* request and response headers now have convenience
  constructors so important fields like method, target,
  result, and version may be set upon construction.

Actions Required:

* Evaluate each message constructor call site and
  adjust the constructor argument list as needed.
2017-07-20 08:15:29 -07:00
Vinnie Falco
2ee088de5f Add basic_parser tests 2017-07-20 08:15:29 -07:00
Vinnie Falco
e608acb791 basic_parser optimizations:
fix #185, fix #489

* SSE4.2 is detected

* basic_parser uses SSE4.2 if available

* basic_parser tries to parse on the initial buffer and if
  it does not find the end of header it shifts to a new
  strategy of waiting for the end of header to defeat
  slow loris attacks. This coincidentally is also faster
  than the previous algorithm.
2017-07-20 08:15:29 -07:00
Vinnie Falco
c94821384d Set version to 72 2017-07-20 08:15:29 -07:00
chriskohlhoff
7e61a48607 Various improvements to http_server_fast.cpp:
fix #578

- Receive request in a single read
- Use fields_alloc for response
- Fix command line usage information
- Add command line option to spin the io_service
2017-07-20 08:15:29 -07:00
Vinnie Falco
a281ca5384 Documentation tidying 2017-07-20 08:15:29 -07:00
Vinnie Falco
6b6c2e0f93 Add websocket-server-async example 2017-07-20 08:15:29 -07:00
Vinnie Falco
c12ded9abc Add http-server-threaded example 2017-07-20 08:15:29 -07:00
Vinnie Falco
09df24ec62 Refactor file_body for best practices 2017-07-20 08:15:29 -07:00
Vinnie Falco
56948edd27 Newly constructed responses have a 200 OK result 2017-07-20 08:15:29 -07:00
Vinnie Falco
ff33783d11 Refine Body::size specification 2017-07-20 08:15:29 -07:00
Vinnie Falco
a2ca4e41ca Tidy up set payload in http-server-fast 2017-07-20 08:15:29 -07:00
Vinnie Falco
b518c487ed Set version to 71 2017-07-20 08:15:29 -07:00
Vinnie Falco
d427b608e8 Tidy up Jamroot /permissive- 2017-07-20 08:15:29 -07:00
Vinnie Falco
f94f5738a3 Update README.md 2017-07-20 08:15:29 -07:00
Vinnie Falco
8910ab44ae Tidy up http_sync_port error check 2017-07-20 08:15:29 -07:00
Vinnie Falco
fcc83e6a19 Concept check in basic_dynamic_body
fix #750
2017-07-20 08:15:29 -07:00
octopus-prime
ebfc3f4537 Fix buffer overflow handling for string_body and mutable_body
fix #553, fix #558
2017-07-20 08:15:29 -07:00
Vinnie Falco
c149321013 Return std::size_t from Body::writer::put (API Change)
`put` returns the number of bytes actually transferred
from the input buffers.

Actions Required:

* Return the number of bytes actually transferred from the
  input buffers in user defined `Body::writer::put` functions.
2017-07-20 08:15:29 -07:00
Vinnie Falco
f3afc834b1 Check trailers in test 2017-07-20 08:15:29 -07:00
Vinnie Falco
2878b38b64 Call prepare_payload in HTTP example 2017-07-20 08:15:29 -07:00
Vinnie Falco
120c38948e Fix spurious on_chunk invocation 2017-07-20 08:15:29 -07:00
Sacha
7f05f67464 Add options for building examples and tests.
Move zlib test sources to test/zlib
2017-07-20 08:15:29 -07:00
Vinnie Falco
6496aa89ee Allow close, ping, and write to happen concurrently 2017-07-20 08:15:29 -07:00
Vinnie Falco
4ff3b524c6 Refactor websocket composed ops 2017-07-20 08:15:29 -07:00
Vinnie Falco
4c41db9ca8 Fine tune websocket asserts 2017-07-20 08:15:29 -07:00
Zach Laine
48929c4b3c std::pair "last" -> "first" in http_message.qbk
fix #563
2017-07-20 08:15:29 -07:00
Zach Laine
4f5f6a46fa Fix can/cannot thinko in FAQ.
fix #562
2017-07-20 08:15:29 -07:00
Vinnie Falco
2843a497a0 Documentation revision
fix #567, fix #572
2017-07-20 08:15:29 -07:00
Vinnie Falco
8b5b8335e6 Fix extra ; warning 2017-07-20 08:15:29 -07:00
Vinnie Falco
431cfe8288 Set version to 70 2017-07-20 08:15:29 -07:00
octopus-prime
9fe7f6e415 Fix HEAD response in file_service 2017-07-20 08:15:29 -07:00
octopus-prime
0ab9975751 Fix BEAST_FALLTHROUGH in config 2017-07-20 08:15:29 -07:00
Vinnie Falco
7753d6eda2 Add parser::on_header to set a callback 2017-07-20 08:15:29 -07:00
Vinnie Falco
788550e833 Add basic_parser header and body limits:
fix #550

* default body limits are now 1MB/8MB
* default header limit is 8KB

Actions Required:

* Call body_limit and/or header_limit as needed to adjust the
  limits to suitable values if the defaults are insufficient.
2017-07-20 08:15:29 -07:00
Vinnie Falco
3c4ae2a098 Rename to message::base (API Change):
Actions Required:

* Change calls to message::header_part() with message::base()
2017-07-20 08:15:29 -07:00
Vinnie Falco
7abe6f6e09 Serialize in one step when possible
fix #546
2017-07-20 08:15:29 -07:00
Vinnie Falco
d45682cfcd Set version to 69 2017-07-20 08:15:29 -07:00
Vinnie Falco
c65074205b Add /permissive- to msvc toolchain 2017-07-20 08:15:29 -07:00
Vinnie Falco
58d42cc803 Use BEAST_FALLTHROUGH to silence warnings
fix #545
2017-07-20 08:15:29 -07:00
Vinnie Falco
f3eaa409d1 basic_parser optimizations 2017-07-20 08:15:29 -07:00
Vinnie Falco
b9597e21a4 Set version to 68 2017-07-20 08:15:29 -07:00
Vinnie Falco
40f0649252 Link statically on cmake MSVC 2017-07-20 08:15:29 -07:00
octopus-prime
b5b1295d0c Add const_body, mutable_body to examples 2017-07-20 08:15:29 -07:00
Vinnie Falco
2d6859831c Optimize field lookups 2017-07-20 08:15:29 -07:00
Vinnie Falco
64ff766b23 Use string_ref in older Boost versions
fix #543
2017-07-20 08:15:29 -07:00
Vinnie Falco
43f8bb841a bad_target replaces bad_path (API Change):
Actions Required:

* Replace references to http::error::bad_path with http::error::bad_target
2017-07-20 08:15:29 -07:00
Vinnie Falco
8207a53113 Adjust buffer size in fast server 2017-07-20 08:15:29 -07:00
Vinnie Falco
723ac8392c Doc erratum 2017-07-20 08:15:29 -07:00
Vinnie Falco
90b51c5f79 Small speed up in fields comparisons 2017-07-20 08:15:29 -07:00