Github user maskit commented on a diff in the pull request:

    https://github.com/apache/trafficserver/pull/391#discussion_r48614287
  
    --- Diff: proxy/http2/HPACK.cc ---
    @@ -263,12 +263,80 @@ Http2DynamicTable::add_header_field(const MIMEField 
*field)
         }
     
         MIMEField *new_field = _mhdr->field_create(name, name_len);
    +    new_field->name_set(_mhdr->m_heap, _mhdr->m_mime, name, name_len);
         new_field->value_set(_mhdr->m_heap, _mhdr->m_mime, value, value_len);
    +    mime_hdr_field_attach(_mhdr->m_mime, new_field, 1, NULL);
         // XXX Because entire Vec instance is copied, Its too expensive!
         _headers.insert(0, new_field);
       }
     }
     
    +uint32_t
    +Http2DynamicTable::get_dynamic_table_size() const
    +{
    +  return _current_size;
    +}
    +
    +Http2LookupIndexResult
    +Http2DynamicTable::get_index(const MIMEFieldWrapper &field) const
    +{
    +  Http2LookupIndexResult result;
    +  int target_name_len = 0, target_value_len = 0;
    +  const char *target_name = field.name_get(&target_name_len);
    +  const char *target_value = field.value_get(&target_value_len);
    +  const int entry_num = TS_HPACK_STATIC_TABLE_ENTRY_NUM + 
get_current_entry_num();
    +
    +  for (int index = 1; index < entry_num; ++index) {
    +    const char *table_name, *table_value;
    +    int table_name_len = 0, table_value_len = 0;
    +
    +    if (index < TS_HPACK_STATIC_TABLE_ENTRY_NUM) {
    +      // static table
    +      table_name = STATIC_TABLE[index].name;
    --- End diff --
    
    Should we care about Static Table here? It's Http2DynamicTable class.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to