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

QueryParameterAttribute doesn't update query string in exchange

XMLWordPrintable

      When using the `QueryParameterAttribute` to set a query parameter, it does not update the query string in the exchange, which makes things out of sync.  If you have a request like so:

       /myEndpoint?foo=bar

      and run a handler like so:

      set( attribute='%{q,baz}', value='bum') 

      and the you dump the request, you'll see:

      parameter=foo=bar
      parameter=baz=bum
      queryString=foo=bar

      The query parameter map gets updated, but the exchange's query string is now out of sync.  This is problematic when using a servlet app with undertow that uses the query string directly as it does not see any of the added parameters.  Note, the `rewrite()` handler does not have this issue and takes care to update both the query parameters AND the query string.  However, it still does have other issues outlined in ticket UNDERTOW-2359

            flaviarnn Flavia Rainone
            bdw429s Brad Wood
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: