Receiving only one cookie in response object from a 3-cookie server reply

184 views
Skip to first unread message

PeterRigole

unread,
Sep 1, 2011, 6:27:51 AM9/1/11
to REST assured
Hello,

I'm using RESTassured 1.2.3 on a server that includes 3 cookies in
it's reply (I validated this with firebug). When I try to fetch my
cookies using response.getCookie("voucher") once for each expected
cookie (with their proper name), I only get one of the three cookies.
When I browse into the received
com.jayway.restassured.response.Response object while debugging, I
also only see one cookie. However, when I trigger a warning by
leaving my cookie-domain (set by the server) empty, I get a warning on
all cookies from the underlying apache client code (once for each of
the 3 cookies):

01-09-2011 12:22:06 0 WARN
org.apache.http.client.protocol.ResponseProcessCookies - Invalid
cookie header: "Set-Cookie: voucher=7848920d-6f72-4167-
a3ad-10bacd15a247; Domain=""; Expires=Sat, 03-Sep-2011 10:22:06 GMT;
Path=/". Blank value for domain attribute

Is it possible that there is a bug in
com.jayway.restassured.response.Response that limits one to fetch only
one of the received cookies (I guess it is the last-set cookie in the
header)?

Best regards,
Peter
Message has been deleted

Johan Haleby

unread,
Sep 1, 2011, 7:30:56 AM9/1/11
to rest-a...@googlegroups.com
Hi, 

Hmm sounds strange indeed.. If you find out anything else please let us know.

/Johan

On Thu, Sep 1, 2011 at 1:00 PM, PeterRigole <peter....@gmail.com> wrote:
The weird thing is that just by re-arranging the order in which I add
the cookies at the server, it does work.

Strange thing, but my problem is solved for now...

  Peter

Sachin kodagali

unread,
Jul 26, 2016, 5:09:10 AM7/26/16
to REST assured
Hi,

We are getting the same issue mentioned in the original post.

I tried detailedCookies(), getCookies() etc but only get one cookie where as there are more than 10 cookies expected in the response.

Let me know if u need any specific details

Johan Haleby

unread,
Jul 26, 2016, 5:10:47 AM7/26/16
to rest-a...@googlegroups.com
What does response logging say?

--
You received this message because you are subscribed to the Google Groups "REST assured" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rest-assured...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages