10 #ifndef BOOST_BEAST_HTTP_DETAIL_RFC7230_HPP 11 #define BOOST_BEAST_HTTP_DETAIL_RFC7230_HPP 26 return c >=
'0' && c <=
'9';
33 static char constexpr tab[] = {
34 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
35 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
36 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
37 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
38 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
39 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
40 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
41 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
42 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
43 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
44 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
45 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
46 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
47 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
48 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
49 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
51 BOOST_STATIC_ASSERT(
sizeof(tab) == 256);
52 return tab[
static_cast<unsigned char>(c)];
60 static char constexpr tab[] = {
61 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0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 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
163 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
164 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
165 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
166 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
167 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
169 BOOST_STATIC_ASSERT(
sizeof(tab) == 256);
170 return tab[
static_cast<unsigned char>(c)];
181 static unsigned char constexpr tab[] = {
182 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0,
183 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
184 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
185 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
186 64, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
187 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 91, 92, 93, 94, 95,
188 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
189 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 0,
190 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
191 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
192 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175,
193 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
194 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
195 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
196 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
197 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255
199 BOOST_STATIC_ASSERT(
sizeof(tab) == 256);
200 return static_cast<char>(tab[
static_cast<unsigned char>(c)]);
208 static signed char constexpr tab[] = {
209 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
210 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
211 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
212 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, -1, -1,
213 -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1,
214 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
215 -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1,
216 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
217 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
218 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
219 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
220 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
221 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
222 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
223 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
224 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
226 BOOST_STATIC_ASSERT(
sizeof(tab) == 256);
227 return tab[
static_cast<unsigned char>(c)];
230 template<
class FwdIt>
237 if(*it !=
' ' && *it !=
'\t')
243 template<
class RanIt>
247 RanIt& it, RanIt
const& first)
251 auto const c = it[-1];
252 if(c !=
' ' && c !=
'\t')
261 template<
class FwdIt>
265 FwdIt& it, FwdIt
const& last)
277 if(*it !=
' ' && *it !=
'\t')
283 if(*it !=
' ' && *it !=
'\t')
289 template<
class FwdIt>
301 auto first = s.begin();
306 auto const c = *std::prev(last);
307 if(c !=
' ' && c !=
'\t')
314 static_cast<std::size_t
>(last - first)};
324 std::pair<string_view, string_view>
v;
332 template<
class =
void>
373 v.first = { &*p0,
static_cast<std::size_t
>(p1 - p0) };
407 v.second = { &*p2,
static_cast<std::size_t
>(
it - p2) };
416 v.second = { &*p2,
static_cast<std::size_t
>(
it - p2) };
432 auto need_comma = it != s.begin();
456 static_cast<std::size_t
>(it - p0)};
std::int8_t unhex(char c)
Definition: rfc7230.hpp:206
std::pair< string_view, string_view > v
Definition: rfc7230.hpp:324
Definition: async_result.hpp:20
iter_type last
Definition: rfc7230.hpp:323
string_view::const_iterator iter_type
Definition: rfc7230.hpp:319
char is_token_char(char c)
Definition: rfc7230.hpp:84
char is_qpchar(char c)
Definition: rfc7230.hpp:145
Definition: beast_common.hpp:6
void increment()
Definition: rfc7230.hpp:340
bool operator()(value_type &v, char const *&it, string_view s) const
Definition: rfc7230.hpp:428
char is_text(char c)
Definition: rfc7230.hpp:57
void skip_token(FwdIt &it, FwdIt const &last)
Definition: rfc7230.hpp:291
iter_type it
Definition: rfc7230.hpp:321
void skip_ows_rev(RanIt &it, RanIt const &first)
Definition: rfc7230.hpp:246
string_view value_type
Definition: rfc7230.hpp:425
bool empty() const
Definition: rfc7230.hpp:327
boost::string_ref string_view
The type of string view used by the library.
Definition: string.hpp:36
Definition: rfc7230.hpp:423
iter_type first
Definition: rfc7230.hpp:322
char is_alpha(char c)
Definition: rfc7230.hpp:31
bool skip_obs_fold(FwdIt &it, FwdIt const &last)
Definition: rfc7230.hpp:264
char to_value_char(char c)
Definition: rfc7230.hpp:178
string_view trim(string_view s)
Definition: rfc7230.hpp:299
char is_qdchar(char c)
Definition: rfc7230.hpp:116
void skip_ows(FwdIt &it, FwdIt const &end)
Definition: rfc7230.hpp:233
Definition: rfc7230.hpp:317
bool is_digit(char c)
Definition: rfc7230.hpp:24