Cookies are not included in the subsequent requests
See original GitHub issueDescribe 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:
- 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
- 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:
- Created 3 years ago
- Comments:11 (6 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.
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