Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-15370

CxfRsProducer: All but last value of query parameter with multiple values are lost

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.3.0
    • 3.4.3, 3.5.0
    • came-cxf
    • None
    • Unknown

    Description

      If using a query parameter name multiple times, only the last value is actually used.

       

      e.g.  .to("cxfrs:http://example.com/") with Exchange value Exchange.HTTP_QUERY id=1&id=2 will call to example.com with id=2

       

      As far as i can tell the problem is caused by CxfRsProducer::getQueryParametersFromQueryString. In the method all query paramters are inserted in a map, and only the last use of a parameter name is preserved.

       

      One solution would be to insert the values directy into the client field, skipping the Map.

       

      Attachments

        1. CAMEL-15370.patch
          5 kB
          Frank Denninger
        2. CAMEL-15370_Chandra.patch
          2 kB
          Chandrakant Hardahe
        3. camel_map_with_list (2).patch
          3 kB
          Frank Denninger

        Issue Links

          Activity

            People

              ffang Freeman Yue Fang
              k5 Frank Denninger
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: