commit b1c37c9e7b30d0efb5e5ccf8200f2a646b9c36f8 Author: Alex Rousskov Date: 2021-03-16 11:45:11 -0400 Limit HeaderLookupTable_t::lookup() to BadHdr and specific IDs diff --git a/src/http/RegisteredHeaders.cc b/src/http/RegisteredHeaders.cc index 6b420638e..348a1bb82 100644 --- a/src/http/RegisteredHeaders.cc +++ b/src/http/RegisteredHeaders.cc @@ -37,7 +37,7 @@ HeaderTableRecord::HeaderTableRecord(const char *n, HdrType theId, HdrFieldType const HeaderTableRecord& HeaderLookupTable_t::lookup (const char *buf, const std::size_t len) const { const HeaderTableRecord *r = HttpHeaderHashTable::lookup(buf, len); - if (!r) + if (!r || r->id == Http::HdrType::OTHER) return BadHdr; return *r; }