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

Cookies don't appear to be working reliably #289

Closed
lambertjosh opened this issue Aug 1, 2017 · 4 comments
Closed

Cookies don't appear to be working reliably #289

lambertjosh opened this issue Aug 1, 2017 · 4 comments

Comments

@lambertjosh
Copy link

lambertjosh commented Aug 1, 2017

I am having a hard time getting Cookies to work in both .16 and .17. I believe this is healthy code, so not quite sure why this isn't working. I apologize if I am using an issue for support, but after spending a few hours on this it seems like a bug.

  let res = http.get(baseURL + "/users/sign_in");

  let formdata = {
    "utf8": "✓",
    ...
  };

  res = http.post(baseURL + "/users/sign_in", formdata);

The response headers from the first request are:

HTTP/1.1 200 OK
Server: nginx
Date: Tue, 01 Aug 2017 04:25:38 GMT
Content-Type: text/html; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Cache-Control: max-age=0, private, must-revalidate
Etag: W/"d39c7d133c76b51c3f5ddbd33597fbd9"
Set-Cookie: _server_session=173e4634b9f5ec4f5e0db9e677af7c7a; path=/; HttpOnly
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-Request-Id: 1d6a0bfc-58a0-4c47-bde5-8bf7f2def0c2
X-Runtime: 0.019530
X-Ua-Compatible: IE=edge
X-Xss-Protection: 1; mode=block
Strict-Transport-Security: max-age=31536000
Content-Encoding: gzip

The second request headers are below. Note, no Cookies.

POST /users/sign_in HTTP/1.1
Host: xxx
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.78 Safari/537.36
Content-Length: 214
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip
@liclac
Copy link
Contributor

liclac commented Aug 1, 2017

The code does indeed look fine, I'll have a look.

@liclac liclac closed this as completed in 810f394 Aug 1, 2017
@jsnod
Copy link

jsnod commented Aug 1, 2017

Thanks for fixing this, any chance for a release to homebrew? I'm unable to test sessions with this broken.

@liclac
Copy link
Contributor

liclac commented Aug 2, 2017

I'll push a release in just a few hours, sorry for the delay! There are a couple of other things I want to include in it as well that I almost have all done already.

@liclac
Copy link
Contributor

liclac commented Aug 3, 2017

Heads up, another delay, I'm stuck on a weird crash during some tests that I can't make heads or tails of; running from master wouldn't be a half bad idea if you're in a hurry.

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

No branches or pull requests

3 participants