QUICHE team | fd50a40 | 2018-12-07 22:54:05 -0500 | [diff] [blame^] | 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_HPACK_TOOLS_HPACK_EXAMPLE_H_ |
| 6 | #define QUICHE_HTTP2_HPACK_TOOLS_HPACK_EXAMPLE_H_ |
| 7 | |
| 8 | #include "net/third_party/quiche/src/http2/platform/api/http2_string.h" |
| 9 | #include "net/third_party/quiche/src/http2/platform/api/http2_string_piece.h" |
| 10 | |
| 11 | // Parses HPACK examples in the format seen in the HPACK specification, |
| 12 | // RFC 7541. For example: |
| 13 | // |
| 14 | // 10 | == Literal never indexed == |
| 15 | // 08 | Literal name (len = 8) |
| 16 | // 7061 7373 776f 7264 | password |
| 17 | // 06 | Literal value (len = 6) |
| 18 | // 7365 6372 6574 | secret |
| 19 | // | -> password: secret |
| 20 | // |
| 21 | // (excluding the leading "//"). |
| 22 | |
| 23 | namespace http2 { |
| 24 | namespace test { |
| 25 | |
| 26 | Http2String HpackExampleToStringOrDie(Http2StringPiece example); |
| 27 | |
| 28 | } // namespace test |
| 29 | } // namespace http2 |
| 30 | |
| 31 | #endif // QUICHE_HTTP2_HPACK_TOOLS_HPACK_EXAMPLE_H_ |