Commit Graph

6 Commits

Author SHA1 Message Date
javanna 4ad33c30ac [TEST] Work around URI encode limitations in RestClient
We've been relying on URI for url encoding, but it turns out it has some problems. For instance '+' stays as is while it should be encoded to `%2B`. If we go and manually encode query params we have to be careful though not to run into double encoding ('+'=>'%2B'=>'%252B'). The applied solution relies on URI encoding for the url path, but manual url encoding for the query parameters. We prevent URI from double encoding query params by using its single argument constructor that leaves everything as is.

We can also revert back the expression script REST test that revealed this to its original content (which contains an addition).

Closes #9769
Closes #9946
2015-03-03 10:21:23 +01:00
Clinton Gormley 8cba6509e4 REST: Fix script-expressions test to work with Perl
Closes #9931
2015-03-02 10:27:05 +01:00
Clinton Gormley 03d6dae834 REST tests - disable expressions test for now
Java returns floating point but JSON contains integer
2015-02-28 19:31:28 +01:00
Clinton Gormley 53d0a0a4b9 REST test: Fixed expressions test
Perl reads the number as a string, so instead mapped the field as a long
specifically.

Also, the value returned in JSON is an integer, not a float
2015-02-28 17:02:29 +01:00
Alexander Reelsen 5de564a19f Testing: Remove plus sign from YAML test due to encoding issue
The plus sign is not treated correctly in encoding and can lead
to problems, if the search request is encoded as HTTP parameter
instead of the HTTP body.

Relates #9769
2015-02-19 18:35:39 +01:00
Alexander Reelsen 2dc70597c2 Testing: Added REST tests to check if expression scripting works 2015-02-19 09:15:28 +01:00