|
| 1 | +// |
| 2 | +// Copyright (c) 2025 Mohammad Nejati |
| 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_RFC_CONTENT_DISPOSITION_RULE_HPP |
| 11 | +#define BOOST_HTTP_PROTO_RFC_CONTENT_DISPOSITION_RULE_HPP |
| 12 | + |
| 13 | +#include <boost/http_proto/detail/config.hpp> |
| 14 | +#include <boost/http_proto/rfc/parameter.hpp> |
| 15 | +#include <boost/url/grammar/range_rule.hpp> |
| 16 | + |
| 17 | +namespace boost { |
| 18 | +namespace http_proto { |
| 19 | + |
| 20 | +namespace implementation_defined { |
| 21 | +struct content_disposition_rule_t |
| 22 | +{ |
| 23 | + struct value_type |
| 24 | + { |
| 25 | + core::string_view type; |
| 26 | + grammar::range<parameter> params; |
| 27 | + }; |
| 28 | + |
| 29 | + BOOST_HTTP_PROTO_DECL |
| 30 | + system::result<value_type> |
| 31 | + parse( |
| 32 | + char const*& it, |
| 33 | + char const* end) const noexcept; |
| 34 | +}; |
| 35 | +} // implementation_defined |
| 36 | + |
| 37 | +/** Rule matching content-disposition |
| 38 | +
|
| 39 | + @par Value Type |
| 40 | + @code |
| 41 | + struct value_type |
| 42 | + { |
| 43 | + core::string_view type; |
| 44 | + grammar::range< parameter > params; |
| 45 | + }; |
| 46 | + @endcode |
| 47 | +
|
| 48 | + @par Example |
| 49 | + @code |
| 50 | + @endcode |
| 51 | +
|
| 52 | + @par BNF |
| 53 | + @code |
| 54 | + content-disposition = disposition-type *( OWS ";" OWS disposition-parm ) |
| 55 | +
|
| 56 | + disposition-type = token |
| 57 | + disposition-parm = token "=" ( token / quoted-string ) |
| 58 | + @endcode |
| 59 | +
|
| 60 | + @par Specification |
| 61 | + @li <a href="https://www.rfc-editor.org/rfc/rfc6266#section-4.1" |
| 62 | + >4.1. Grammar (rfc6266)</a> |
| 63 | + @li <a href="https://www.rfc-editor.org/rfc/rfc7230#section-3.2.6" |
| 64 | + >3.2.6. Field Value Components (rfc7230)</a> |
| 65 | +
|
| 66 | + @see |
| 67 | + @ref quoted_token_view. |
| 68 | +*/ |
| 69 | +BOOST_INLINE_CONSTEXPR implementation_defined::content_disposition_rule_t content_disposition_rule{}; |
| 70 | + |
| 71 | +} // http_proto |
| 72 | +} // boost |
| 73 | + |
| 74 | +#endif |
0 commit comments