Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not all cookies attribute are kept in memory #2298

Closed
elafontaine opened this issue Apr 12, 2023 · 2 comments
Closed

Not all cookies attribute are kept in memory #2298

elafontaine opened this issue Apr 12, 2023 · 2 comments

Comments

@elafontaine
Copy link

The following documentation says I should be able to get any "field" of a cookie "passed as-is as part of the next HTTP request"
https://github.com/karatelabs/karate#responsecookies

However, this is false as we do not keep every attribute of a cookie and so it ends up being a different "cookie" being sent back.

This was discussed in #1708 and in #2165 . See #2165 (comment)

It's also causing issues when trying to test out cookie attributes of an application that needs those feature (i.e. different user-agent getting different cookie attributes for scoping).

In other words, this didn't work ;

    When method post
    Then status 302
    * print response
    * print responseHeaders
    * print responseCookies
    And match responseCookies == '#notnull'
    And match responseHeaders['Set-Cookie'][0] contains 'SameSite=None'

I would have to confirm again, but my team is pinned on karate version 1.1.0 since the last time I wrote.

I will confirm with 1.3.0 right now.

@ptrthomas
Copy link
Member

@elafontaine yes please confirm with 1.3.0 and you are looking at the right history. tagging as help wanted anyways. that said, I see the 302 status, so please try * configure followRedirects = false and refer comments here: https://stackoverflow.com/q/75707869/143475

@ptrthomas
Copy link
Member

closing this. this can certainly be re-opened if we get a way to replicate: https://github.com/karatelabs/karate/wiki/How-to-Submit-an-Issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants