Go to the documentation of this file.
30 #include "absl/strings/str_format.h"
31 #include "absl/strings/string_view.h"
56 size_t index = first_entry_ % max_entries_;
64 if (
index >= num_entries_)
return nullptr;
70 if (max_entries == max_entries_)
return;
71 std::vector<Memento> entries;
72 entries.reserve(num_entries_);
73 for (
size_t i = 0;
i < num_entries_;
i++) {
89 mem_used_ -= first_entry.transport_size();
111 "Attempt to make hpack table %d bytes when max is %d bytes",
bytes,
130 "HPACK max table size reduced to %d but not reflected by hpack "
131 "stream (still at %d)",
151 while (
md.transport_size() >
163 struct StaticTableEntry {
173 {
":path",
"/index.html"},
175 {
":scheme",
"https"},
183 {
"accept-charset",
""},
184 {
"accept-encoding",
"gzip, deflate"},
185 {
"accept-language",
""},
186 {
"accept-ranges",
""},
188 {
"access-control-allow-origin",
""},
191 {
"authorization",
""},
192 {
"cache-control",
""},
193 {
"content-disposition",
""},
194 {
"content-encoding",
""},
195 {
"content-language",
""},
196 {
"content-length",
""},
197 {
"content-location",
""},
198 {
"content-range",
""},
199 {
"content-type",
""},
208 {
"if-modified-since",
""},
209 {
"if-none-match",
""},
211 {
"if-unmodified-since",
""},
212 {
"last-modified",
""},
215 {
"max-forwards",
""},
216 {
"proxy-authenticate",
""},
217 {
"proxy-authorization",
""},
224 {
"strict-transport-security",
""},
225 {
"transfer-encoding",
""},
229 {
"www-authenticate",
""},
233 auto sm = kStaticTable[
i];
246 return *static_mementos;
ABSL_MUST_USE_RESULT std::string StrFormat(const FormatSpec< Args... > &format, const Args &... args)
static Slice FromStaticString(const char *s)
void Rebuild(uint32_t max_entries)
const Memento * Lookup(uint32_t index) const
OPENSSL_EXPORT pem_password_cb void * u
static constexpr uint32_t EntriesForBytes(uint32_t bytes) noexcept
std::vector< Memento > entries_
#define GRPC_TRACE_FLAG_ENABLED(f)
uint32_t current_table_bytes_
ParsedMetadata< grpc_metadata_batch > Memento
constexpr absl::remove_reference_t< T > && move(T &&t) noexcept
GPRAPI void gpr_log(const char *file, int line, gpr_log_severity severity, const char *format,...) GPR_PRINT_FORMAT_CHECK(4
grpc_error_handle Add(Memento md) GRPC_MUST_USE_RESULT
static const StaticMementos & GetStaticMementos() GPR_ATTRIBUTE_NOINLINE
static constexpr uint32_t kEntryOverhead
MementoRingBuffer entries_
static constexpr uint32_t kInitialTableEntries
static constexpr uint32_t kLastStaticEntry
const StaticMementos & static_metadata_
#define GRPC_ERROR_CREATE_FROM_CPP_STRING(desc)
grpc_error_handle SetCurrentTableSize(uint32_t bytes)
uint32_t num_entries() const
grpc_core::TraceFlag grpc_http_trace
void SetMaxBytes(uint32_t max_bytes)
Memento memento[hpack_constants::kLastStaticEntry]
grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:00:13