Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:29:28

0001 //
0002 // Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com)
0003 //
0004 // Distributed under the Boost Software License, Version 1.0. (See accompanying
0005 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0006 //
0007 // Official repository: https://github.com/boostorg/beast
0008 //
0009 
0010 #ifndef BOOST_BEAST_HTTP_DETAIL_RFC7230_HPP
0011 #define BOOST_BEAST_HTTP_DETAIL_RFC7230_HPP
0012 
0013 #include <boost/beast/core/string.hpp>
0014 #include <cstdint>
0015 #include <iterator>
0016 #include <utility>
0017 
0018 namespace boost {
0019 namespace beast {
0020 namespace http {
0021 namespace detail {
0022 
0023 BOOST_BEAST_DECL
0024 bool
0025 is_digit(char c);
0026 
0027 BOOST_BEAST_DECL
0028 char
0029 is_alpha(char c);
0030 
0031 BOOST_BEAST_DECL
0032 char
0033 is_text(char c);
0034 
0035 BOOST_BEAST_DECL
0036 char
0037 is_token_char(char c);
0038 
0039 BOOST_BEAST_DECL
0040 char
0041 is_qdchar(char c);
0042 
0043 BOOST_BEAST_DECL
0044 char
0045 is_qpchar(char c);
0046 
0047 
0048 // converts to lower case,
0049 // returns 0 if not a valid text char
0050 //
0051 BOOST_BEAST_DECL
0052 char
0053 to_value_char(char c);
0054 
0055 // VFALCO TODO Make this return unsigned?
0056 BOOST_BEAST_DECL
0057 std::int8_t
0058 unhex(char c);
0059 
0060 BOOST_BEAST_DECL
0061 string_view
0062 trim(string_view s);
0063 
0064 struct param_iter
0065 {
0066     using iter_type = string_view::const_iterator;
0067 
0068     iter_type it;
0069     iter_type first;
0070     iter_type last;
0071     std::pair<string_view, string_view> v;
0072 
0073     bool
0074     empty() const
0075     {
0076         return first == it;
0077     }
0078 
0079     BOOST_BEAST_DECL
0080     void
0081     increment();
0082 };
0083 
0084 /*
0085     #token = [ ( "," / token )   *( OWS "," [ OWS token ] ) ]
0086 */
0087 struct opt_token_list_policy
0088 {
0089     using value_type = string_view;
0090 
0091     BOOST_BEAST_DECL
0092     bool
0093     operator()(value_type& v,
0094         char const*& it, string_view s) const;
0095 };
0096 
0097 } // detail
0098 } // http
0099 } // beast
0100 } // boost
0101 
0102 #ifdef BOOST_BEAST_HEADER_ONLY
0103 #include <boost/beast/http/detail/rfc7230.ipp>
0104 #endif
0105 
0106 #endif
0107