A type of holder of limits related to an incoming HTTP message.
Since v.0.6.12 RESTinio supports various limits for incoming HTTP messages. If some part of message (like the length of HTTP field name) exceeds the specified limit then that message will be ignored by RESTinio.
For the compatibility with the previous versions such limits are optional. The default constructor of incoming_http_msg_limits_t sets the limits to the maximum values that cannot be exceeded.
In v.0.6.12 a user has to set appropriate values for limits by his/herself. For example:
restinio::on_this_thread<>()
.port(8080)
.address("localhost")
.incoming_http_msg_limits(
)
.request_handler(...)
);
A type of holder of limits related to an incoming HTTP message.
RESTINIO_NODISCARD std::size_t max_field_name_size() const noexcept
RESTINIO_NODISCARD std::size_t max_url_size() const noexcept
RESTINIO_NODISCARD std::uint64_t max_body_size() const noexcept
RESTINIO_NODISCARD std::size_t max_field_value_size() const noexcept
void run(asio_ns::io_context &ioctx, run_on_this_thread_settings_t< Traits > &&settings)
Helper function for running http server until ctrl+c is hit.
- Attention
- Setters of incoming_http_msg_limits_t doesn't checks values. It means that it is possible to set 0 as a limit for the length of field name size. That will lead to ignorance of every incoming request.
- Note
- Almost all limits except the limit for the body size are std::size_t. It means that those limits can have different borders in 32- and 64-bit mode. The limit for the body size is always std::uint64_t.
- Since
- v.0.6.12
Definition at line 68 of file incoming_http_msg_limits.hpp.