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

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

GitHub user shinrich opened a pull request:

    https://github.com/apache/trafficserver/pull/139

    TS-3155

    Adding value_get_index to test for presence of value in MIME header field.
    Using it in the keep alive checks.  There are other places in the code
    where this change can be used to avoid full value copy and parsing.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/shinrich/trafficserver ts-3155

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/trafficserver/pull/139.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #139
    
----
commit e3dd78f250e40316895415614fe7a73b64ad061b
Author: shinrich <[email protected]>
Date:   2014-11-07T17:31:03Z

    TS-3155
    Adding value_get_index to test for presence of value in MIME header field.
    Using it in the keep alive checks.  There are other places in the code
    where this change can be used to avoid full value copy and parsing.

----


> Add a value test method to the MIMEField class
> ----------------------------------------------
>
>                 Key: TS-3155
>                 URL: https://issues.apache.org/jira/browse/TS-3155
>             Project: Traffic Server
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Susan Hinrichs
>            Assignee: Susan Hinrichs
>             Fix For: 5.2.0
>
>         Attachments: ts-3155.patch
>
>
> In some cases, you don't need to directly manipulate the strings of values in 
> a mime field.  But you do need to test if a mime field contains a value (e.g. 
> does the Connection field contain the value "close").
> Currently, you must call MIMEField::value_get, but that does a bunch of 
> copies and string allocation which is not needed in our case.  We propose 
> adding a MIMEField::value_get_index method which returns the index of the 
> value in the list if it is present and -1 otherwise.  Will still need to do 
> the string parsing, but do not need to do the copies and allocation.



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

Reply via email to