HpackIndexingTable
| 309 | // HpackIndexingTable |
| 310 | // |
| 311 | HpackLookupResult |
| 312 | HpackIndexingTable::lookup(const HpackHeaderField &header) const |
| 313 | { |
| 314 | // static table |
| 315 | HpackLookupResult result = HpackStaticTable::lookup(header); |
| 316 | |
| 317 | // if result is not EXACT match, lookup dynamic table |
| 318 | if (result.match_type == HpackMatch::EXACT) { |
| 319 | return result; |
| 320 | } |
| 321 | |
| 322 | // dynamic table |
| 323 | if (XpackLookupResult dt_result = this->_dynamic_table.lookup_relative(header.name, header.value); |
| 324 | dt_result.match_type == XpackLookupResult::MatchType::EXACT) { |
| 325 | return {static_cast<uint32_t>(TS_HPACK_STATIC_TABLE_ENTRY_NUM + dt_result.index), HpackIndex::DYNAMIC, |
| 326 | static_cast<HpackMatch>(dt_result.match_type)}; |
| 327 | } |
| 328 | |
| 329 | return result; |
| 330 | } |
| 331 | |
| 332 | int |
| 333 | HpackIndexingTable::get_header_field(uint32_t index, MIMEFieldWrapper &field) const |
no test coverage detected