Forum Discussion

Ton636's avatar
Ton636
Contributor
12 years ago

(Res) Bug using %7C in template parameter plus query param

(just moving to the bugs forum since this didnt receive a reply in support)

Hi,

I think I have found a bug in 4.5.1 (it also seems present in 4.5.0). But I might be doing something inherently wrong... I have an api where a particular call expects a template parameter in the form 1|1 and then some query parameters. I already know I need to urlencode the | otherwise it wont work... but if I send 1%7C1 as well as a query parameter, soapUI seems to ignore the query parameter entirely. The response from the API confirms that it never received any query parameters. If all I do is change that 1%7C1 to , say 1, then the query parameter is sent... I actually found a workaround (I consider it a very nasty hack... but whatever works) by appending any query parameters I want to send, to the value for the template parameter! So instead of sending 1%7C1 I will send 1%7C1?myqueryparam=somevalue

I have created a mini project to demo what I mean and will attach it. There is just one API resource (a dummy one of course) with three requests. One working as expected, one wrong and one with the workaround. You can see the problem by looking at the raw request when sending each request. The wrong one doesn't have the query parameter in the raw request.

Hope that is clear enough. I've tried flipping the 'donoturlencode' setting for the template parameter, but it didnt seem to do anything.

3 Replies

  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    I believe there is a fix on latest nightly build that might solve your issue. Just makes sure if you have encoded values then, you check the Preferences > Pre-encoded Endpoints and save Preferences.

    Regards,
    Shadid
    SmartBear Sweden
  • Hi Shadid,

    Thanks! I was finally able to install the nightly build and it seems it resolves this bug (do I get another bug tshirt? or did someone else report it too? )

    Ton.
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi Ton,

    Unfortunately, you were not the first reporter of this bug. Next time

    //Shadid
    SmartBear Sweden.