xref: /aosp_15_r20/external/cronet/net/third_party/quiche/src/quiche/http2/test_tools/hpack_example.h (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef QUICHE_HTTP2_TEST_TOOLS_HPACK_EXAMPLE_H_
6 #define QUICHE_HTTP2_TEST_TOOLS_HPACK_EXAMPLE_H_
7 
8 #include <string>
9 
10 #include "absl/strings/string_view.h"
11 
12 // Parses HPACK examples in the format seen in the HPACK specification,
13 // RFC 7541. For example:
14 //
15 //       10                                      | == Literal never indexed ==
16 //       08                                      |   Literal name (len = 8)
17 //       7061 7373 776f 7264                     | password
18 //       06                                      |   Literal value (len = 6)
19 //       7365 6372 6574                          | secret
20 //                                               | -> password: secret
21 //
22 // (excluding the leading "//").
23 
24 namespace http2 {
25 namespace test {
26 
27 std::string HpackExampleToStringOrDie(absl::string_view example);
28 
29 }  // namespace test
30 }  // namespace http2
31 
32 #endif  // QUICHE_HTTP2_TEST_TOOLS_HPACK_EXAMPLE_H_
33