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

Could not get the cookies from http response #70

Closed
Sherry-sh opened this issue Sep 1, 2015 · 2 comments
Closed

Could not get the cookies from http response #70

Sherry-sh opened this issue Sep 1, 2015 · 2 comments

Comments

@Sherry-sh
Copy link

Hi,
We've been trying to use pyresttest for testing a web application, but we couldn't get the cookie through the header extracts

- headers: {Content-Type: application/json}
- extract_binds:
          - 'Set-Cookie': { header: 'Set-cookie'}

but we could not get any Results

Could someone please explain why this happens and how I could fix the above example to make it work?

@Sherry-sh
Copy link
Author

--verbose command:

  • Hostname was NOT found in DNS cache
  • Trying 172.173.1.216...
  • Connected to 172.173.1.216 (172.173.1.216) port 80 (#0)

    POST /api/user/login HTTP/1.1
    User-Agent: PycURL/7.19.3 libcurl/7.35.0 GnuTLS/2.12.23 zlib/1.2.8 libidn/1.28 librtmp/2.3
    Host: 172.173.1.216
    Accept: /
    Content-Type:application/json
    Connection: close
    Content-Length: 48

< HTTP/1.1 200 OK
< Access-Control-Allow-Credentials: true
< Access-Control-Allow-Origin: None
< Content-Length: 95
< Content-Type: text/html; charset=UTF-8
< Set-Cookie: sid="!uoEbeRG4Mn4BDaQusNfyLA==?gASVJAAAAAAAAACMA3NpZJSMGDU1ZTYxYTMxMDhiODA1MGJiNTgxMGEwY5SGlC4="; Path=/
< Connection: close

@svanoort
Copy link
Owner

This has been belatedly fixed (with tests) by this commit: 29ec38a

@svanoort svanoort added the bug label Oct 3, 2015
@svanoort svanoort added this to the Release 1.6.0 milestone Oct 3, 2015
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