[ 
https://issues.apache.org/jira/browse/TS-3478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15075174#comment-15075174
 ] 

ASF GitHub Bot commented on TS-3478:
------------------------------------

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.


> Indexing header representations on HPACK encoder
> ------------------------------------------------
>
>                 Key: TS-3478
>                 URL: https://issues.apache.org/jira/browse/TS-3478
>             Project: Traffic Server
>          Issue Type: Improvement
>          Components: HTTP/2
>            Reporter: Ryo Okubo
>            Assignee: Ryo Okubo
>              Labels: review
>             Fix For: 6.1.0
>
>         Attachments: indexing.patch
>
>
> Support other header field representations on HPACK encoder.
> http://tools.ietf.org/html/draft-ietf-httpbis-header-compression-12#section-6
> Currently the encoder supports only [Literal Header Field never 
> Indexed|http://tools.ietf.org/html/draft-ietf-httpbis-header-compression-12#section-6.2.3].



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to