question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cookies are not included in the subsequent requests

See original GitHub issue

Describe the bug When the cookie is dropped and cookie value is surrounded with double quotes then the cookie is not passed onto the subsequent requests.

E.g

To Reproduce Steps to reproduce the behavior:

  1. Make a request that will drop cookie_name="blah";Max-Age=86400;Expires=Wed, 9 Dec 2020 18:01:58 GMT;Path=/;Domain=example.com;HTTPOnly
  2. Make another request on same domain

Expected behavior the cookie should be passed and sent with the 2nd request.

Screenshots If applicable, add screenshots to help explain your problem.

Environmental Data:

  • Java Version 11
  • Version [e.g. 3.9.00]

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
rybercommented, Dec 9, 2020

So, just to clarify the reason, Apache manages the cookie store, and this is just it’s behavior. It is possible to write your own CookieStore and make a custom HttpClient but, I’m also in the process of re-writing Unirest to not use Apache at all, so any more investment in it is just tech debt at this point.

You could handle this pretty easily with a custom Unirest interceptor.

1reaction
rybercommented, Dec 9, 2020

So, just to fix my mistake. sort of. Either you want cookie management or not, we either honor the contract of cookies, OR you can override the whole thing. But we cannot do a mix

Read more comments on GitHub >

github_iconTop Results From Across the Web

Browser not sending cookie in subsequent request
Your issue is that cookies are only sent based on the domain. Your code has var settings = { "crossDomain": true, ...
Read more >
7 Keys to the Mystery of a Missing Cookie - Medium
So this could be another reason why the cookies are missing in the POST cross-site request. Troubleshooting tip: open the developer console and ......
Read more >
Cookies headers are present but Cookies are not stored in ...
I'm making cross-domain request between two subdomains: sub1.local and sub2.local. Both are on local, as you see.
Read more >
Using HTTP cookies - MDN Web Docs
Then, with every subsequent request to the server, the browser sends all previously stored cookies back to the server using the Cookie header....
Read more >
Why third-party cookies are NOT sent where you think they ...
You can view the first-party cookies on chrome by following the procedure: Open dev console ... If Domain is specified, then subdomains are...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found