sahaya / rest-assured

Automatically exported from code.google.com/p/rest-assured
0 stars 0 forks source link

RA lost last slash #291

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. given().log().all().expect().log().all().get("/bla/bla/");

What is the expected output? What do you see instead?
Request method: GET
Request path:   http://localhost:8080/bla/bla/

Instead:
Request method: GET
Request path:   http://localhost:8080/bla/bla

What version of the product are you using? On what operating system?
1.9.0, 1.8.2-SNAPSHOT, any OS.

Please provide any additional information below.

Error in this 
method:com/jayway/restassured/internal/RequestSpecificationImpl.groovy:1260

pathWithoutQueryParams = StringUtils.split(tempParams, "/").inject("") { String 
acc, String subresource ->
                ...
                format("%s/%s", acc, encode(subresource, EncodingTarget.QUERY)).toString()
            }
After closure pathWithoutQueryParams has path without last slash

Original issue reported on code.google.com by twilig...@gmail.com on 24 Dec 2013 at 9:09

GoogleCodeExporter commented 9 years ago
The quick workaround is add path param with empty value to the end:
 + "{qwerty}", ""

Original comment by twilig...@gmail.com on 24 Dec 2013 at 9:24

GoogleCodeExporter commented 9 years ago
Hi, 

Try upgrading to the latest version currently (2.1.0) and see if it works 
better.

Original comment by johan.ha...@gmail.com on 28 Dec 2013 at 3:07

GoogleCodeExporter commented 9 years ago
Closing since no response from user

Original comment by johan.ha...@gmail.com on 8 Jan 2014 at 6:26

GoogleCodeExporter commented 9 years ago
In 2.2.0 not reproduced, thanks!

Original comment by twilig...@gmail.com on 24 Jan 2014 at 10:39