Uploaded image for project: 'Undertow'
  1. Undertow
  2. UNDERTOW-2274

Allow exchange attributes which accept arbitrary text to accept nested exchange attributes

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • None
    • Predicate Language
    • None

      I realize the ticket title may be confusing.  Consider this example.  We can already provided hard-coded values to attributes such as ResponseHeaderAttribute.

      %{o,my-header}
      

      But what if I wanted to make the name of the header I was setting dynamic based upon the value of another attribute?

      %{o,%{q,headerName}} 

      That example would look for a query param named "headerName" and then use its value as the name of the response header.

      There are a handful of exchange attribute which accept text which is currently limited to a static string, that I'd like to see start parsing the input to treat it as an attribute (which may very well be a ConstantAttribute).  This will make the predicate language more flexible and also allow for transformations as defined in UNDERTOW-2120.

      • ResponseHeaderAttribute
      • RequestHeaderAttribute
      • QueryParameterAttribute
      • CookieAttribute
      • The new string transformer attributes spec'd in UNDERTOW-2120

      Please note, the exchange attribute parser needs a fix applied to allow parsing of an attribute that nests another attribute. https://issues.redhat.com/browse/UNDERTOW-2273

      The builder for these attributes would still accept a string token, but would run it through the ExchangeAttributeParser and internally would store an ExchangeAttribute instead of a String which would be read at the point of use.

            mjusko@redhat.com Marek Jusko
            bdw429s Brad Wood (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: