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.
This commit is contained in:
Vinnie Falco committed 2017-07-20 08:15:29 -07:00
1 parent 3c4ae2a098
commit 788550e833
8 files changed
+229 -17

No files matched your search

+14
View File
@@ -80,6 +80,20 @@ enum class error
*/
buffer_overflow,
/** Header limit exceeded.
The parser detected an incoming message header which
exceeded a configured limit.
*/
header_limit,
/** Body limit exceeded.
The parser detected an incoming message body which
exceeded a configured limit.
*/
body_limit,
/** A memory allocation failed.
When basic_fields throws std::bad_alloc, it is