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