Community
Participate
Working Groups
There is a subtle bug in the ECF framework that results in a double encoding of HTTP post/get/put requests. The methods RestClientService::prepare[X]Method for X = Post, Get, Put follow the same pattern to set the request query string from the request parameters: HttpMethod result =... NameValuePair[] params = toNameValuePairs(uri, call, callable); if (params != null) result.setQueryString(params); return result; According to doc, org.apache.commons.httpclient.HttpMethod.setQueryString(NameValuePair[]) already encodes the name value pairs. This is on top of the encoding that RestClientService::toNameValuePairs() currently does, resulting in doubly encoded name/value pairs in the query string. The suggested fix is to simply remove the encoding in RestClientService::toNameValuePairs() as shown in the attached patch.
Created attachment 173037 [details] Patch for RestClientService::toNameValuePairs() to remove the redundant encoding of the name/value pairs.
Thanks for the report and the patch Nicolas. I'll review the patch and apply/release to HEAD as soon as I can.
Patch applied and released to HEAD. Thanks again Nicolas for the report and the fix.
Also applied patch to Release_3_3 stream (for 3.3.1 service release).