suvallur / rest-assured

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

Incorrect parsing of Null-value params #314

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1.You can write this code with null-value param "&voidparam=" in get-request:  
expect().statusCode(200).when()
                .given().log().all()
                .get("http://httpbin.org/get?param1=1&voidparam=&param3=3");
or 
expect().statusCode(200).when()
                .given().log().all()
                .get(new URI("http://httpbin.org/get?param1=1&voidparam=&param3=3"));
2.And you obtain:
(&voidparam has incorrect become a param without value)
Request method: GET
Request path: http://httpbin.org/get?param1=1&voidparam&param3=3
Request params: <none>
Query params: <none>
Form params: <none>
Path params: <none>
Headers: Content-Type=*/*
Cookies: <none>
Body: <none>

What is the expected output? What do you see instead?

Expected output is:
Request method: GET
Request path: http://httpbin.org/get?param1=1&voidparam=&param2=2
Request params: param1=1
 voidparam=
 param2=2
Query params: <none>
Form params: <none>
Path params: <none>
Headers: Content-Type=*/*
Cookies: <none>
Body: <none>

What version of the product are you using? On what operating system?
 <groupId>com.jayway.restassured</groupId>
 <artifactId>rest-assured</artifactId>
 <version>2.3.1-SNAPSHOT</version>

Please provide any additional information below.

Original issue reported on code.google.com by aleksand...@gmail.com on 25 Feb 2014 at 10:33

GoogleCodeExporter commented 9 years ago
Sorry,
I made a mistake in title "Incorrect parsing of Null-value params".  
I mean empty value param.

Original comment by aleksand...@gmail.com on 25 Feb 2014 at 10:41

GoogleCodeExporter commented 9 years ago

Original comment by johan.ha...@gmail.com on 4 Mar 2014 at 6:40

GoogleCodeExporter commented 9 years ago
This has now been fixed in master.

Original comment by johan.ha...@gmail.com on 7 Mar 2014 at 1:47