// Copyright 2016 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef QUICHE_HTTP2_HPACK_DECODER_HPACK_DECODER_TABLES_H_ #define QUICHE_HTTP2_HPACK_DECODER_HPACK_DECODER_TABLES_H_ // Static and dynamic tables for the HPACK decoder. See: // http://httpwg.org/specs/rfc7541.html#indexing.tables // Note that the Lookup methods return nullptr if the requested index was not // found. This should be treated as a COMPRESSION error according to the HTTP/2 // spec, which is a connection level protocol error (i.e. the connection must // be terminated). See these sections in the two RFCs: // http://httpwg.org/specs/rfc7541.html#indexed.header.representation // http://httpwg.org/specs/rfc7541.html#index.address.space // http://httpwg.org/specs/rfc7540.html#HeaderBlock #include <stddef.h> #include <cstdint> #include <iosfwd> #include <string> #include <utility> #include <vector> #include "quiche/http2/http2_constants.h" #include "quiche/common/platform/api/quiche_export.h" #include "quiche/common/quiche_circular_deque.h" namespace http2 { namespace test { class HpackDecoderTablesPeer; } // namespace test struct QUICHE_EXPORT HpackStringPair { … }; QUICHE_EXPORT std::ostream& operator<<(std::ostream& os, const HpackStringPair& p); // See http://httpwg.org/specs/rfc7541.html#static.table.definition for the // contents, and http://httpwg.org/specs/rfc7541.html#index.address.space for // info about accessing the static table. class QUICHE_EXPORT HpackDecoderStaticTable { … }; // HpackDecoderDynamicTable implements HPACK compression feature "indexed // headers"; previously sent headers may be referenced later by their index // in the dynamic table. See these sections of the RFC: // http://httpwg.org/specs/rfc7541.html#dynamic.table // http://httpwg.org/specs/rfc7541.html#dynamic.table.management class QUICHE_EXPORT HpackDecoderDynamicTable { … }; class QUICHE_EXPORT HpackDecoderTables { … }; } // namespace http2 #endif // QUICHE_HTTP2_HPACK_DECODER_HPACK_DECODER_TABLES_H_