Uploaded image for project: 'Traffic Server'
  1. Traffic Server
  2. TS-3155

Add a value test method to the MIMEField class

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 5.2.0
    • Core
    • None

    Description

      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.

      Attachments

        1. ts-3155.patch
          7 kB
          Susan Hinrichs

        Issue Links

          Activity

            People

              shinrich Susan Hinrichs
              shinrich Susan Hinrichs
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: