GCC Code Coverage Report


Directory: libs/http_proto/
File: include/boost/http_proto/request_parser.hpp
Date: 2025-06-15 05:10:38
Exec Total Coverage
Lines: 4 4 100.0%
Functions: 1 1 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 <cstddef>
19 #include <utility>
20
21 namespace boost {
22 namespace http_proto {
23
24 class request_parser
25 : public parser
26 {
27 public:
28 /** Configuration settings for parsing requests
29 */
30 struct config : config_base
31 {
32 /** Constructor
33 */
34 23 config() noexcept
35 23 {
36 23 body_limit = 64 * 1024;
37 23 }
38 };
39
40 /** Constructor
41 */
42 BOOST_HTTP_PROTO_DECL
43 explicit
44 request_parser(context&);
45
46 /** Return a read-only view to the parsed request headers.
47
48 The returned view becomes invalid after calling
49 @ref start or @ref reset.
50
51 @par Preconditions
52 This function can be called only after the
53 header is fully parsed.
54
55 @return A read-only view to the parsed request headers.
56 */
57 BOOST_HTTP_PROTO_DECL
58 request_view
59 get() const;
60 };
61
62 } // http_proto
63 } // boost
64
65 #endif
66