GCC Code Coverage Report


Directory: libs/http_proto/include/boost/http_proto/
File: boost/http_proto/request_parser.hpp
Date: 2023-02-25 19:48:06
Exec Total Coverage
Lines: 7 7 100.0%
Functions: 2 2 100.0%
Branches: 0 0 -%

Line Branch Exec Source
1 //
2 // Copyright (c) 2019 Vinnie Falco (vinnie.falco@gmail.com)
3 //
4 // Distributed under the Boost Software License, Version 1.0. (See accompanying
5 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 //
7 // Official repository: https://github.com/CPPAlliance/http_proto
8 //
9
10 #ifndef BOOST_HTTP_PROTO_REQUEST_PARSER_HPP
11 #define BOOST_HTTP_PROTO_REQUEST_PARSER_HPP
12
13 #include <boost/http_proto/detail/config.hpp>
14 #include <boost/http_proto/error.hpp>
15 #include <boost/http_proto/method.hpp>
16 #include <boost/http_proto/parser.hpp>
17 #include <boost/http_proto/request_view.hpp>
18 #include <boost/http_proto/string_view.hpp>
19 #include <cstddef>
20 #include <utility>
21
22 namespace boost {
23 namespace http_proto {
24
25 class BOOST_SYMBOL_VISIBLE
26 request_parser
27 : public parser
28 {
29 public:
30 /** Configuration settings for parsing requests
31 */
32 struct config : config_base
33 {
34 /** Constructor
35 */
36 5 config() noexcept
37 5 {
38 5 body_limit = 64 * 1024;
39 5 }
40 };
41
42 /** Constructor
43 */
44 BOOST_HTTP_PROTO_DECL
45 explicit
46 request_parser(context&);
47
48 /** Prepare for the next message on the stream.
49 */
50 void
51 767 start()
52 {
53 767 start_impl(false);
54 767 }
55
56 /** Return the parsed request headers.
57 */
58 BOOST_HTTP_PROTO_DECL
59 request_view
60 get() const noexcept;
61 };
62
63 } // http_proto
64 } // boost
65
66 #endif
67