Campoie / rest-assured

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

Suspect Set-Cookie parsing is flawed #130

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Let the server send a Set-Cookie header with the following cookie: 
SPRING_SECURITY_REMEMBER_ME_COOKIE=Y3NsUmRWbjRsSHNqdmVsQzlBdUd5dz09OkF3cUpoSkord
nd4cVlWUGRkdTNnb3c9PQ;Path=/;Expires=Mon, 13-Feb-2012 15:32:43 GMT
2. Retrieve the cookies with the cookies() method:
        cookies = with()
                .contentType(ContentType.JSON)
                .body(json).expect().statusCode(200)
                .when()
                .post(url("login"))
                .cookies();

What is the expected output? What do you see instead?
The expected output is a single cookie named SPRING_SECURITY_REMEMBERME_COOKIE, 
but I see three cookies:
One named SPRING_SECURITY_REMEMBERME_COOKIE, one named Path, and named Expiry 
Date.
See attached screen shot for details.

What version of the product are you using? On what operating system?
1.4 on MacOSX Lion

Please provide any additional information below.

Original issue reported on code.google.com by ulrik.sandberg on 24 Oct 2011 at 6:25

Attachments:

GoogleCodeExporter commented 9 years ago
The last cookie is named Expires, not Expiry Date.

Original comment by ulrik.sandberg on 24 Oct 2011 at 6:26

GoogleCodeExporter commented 9 years ago

Original comment by johan.ha...@gmail.com on 25 Oct 2011 at 7:19

GoogleCodeExporter commented 9 years ago

Original comment by johan.ha...@gmail.com on 25 Oct 2011 at 7:48

GoogleCodeExporter commented 9 years ago
Should now be fixed in trunk. I pushed the latest snapshot to sonatype. Use

<repositories>
        <repository>
            <id>sonatype</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
            <snapshots />
        </repository>
</repositories>

and depend on 1.4.1-SNAPSHOT if you want to try the fix.

Original comment by johan.ha...@gmail.com on 2 Nov 2011 at 8:10

GoogleCodeExporter commented 9 years ago
Much better. Looking forward to a 1.4.1 with this fix included.

Original comment by ulrik.sandberg on 7 Nov 2011 at 9:26