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.

Bug (Maybe) cookies are duplicated on subsequent redirects

See original GitHub issue

I am not sure if this is a bug yet, trying to reproduce and write some tests, but cannot due to #227

But figured I’ll open an issue, just in case, maybe you can spot the error, if there is one.

Here is a sanitized request flow:

GET /url1 HTTP/1.1
Cookie: cookiename=111111;

HTTP/1.1 302 Found

GET /url2 HTTP/1.1
Cookie: cookiename=111111; cookiename=111111;

HTTP/1.1 302 Found
Location: /url3
Set-Cookie: cookiename=222222;; Expires=Thu, 10-Nov-2039 23:46:26 GMT; Path=/

GET /url3 HTTP/1.1
Cookie: cookiename=111111; cookiename=111111; cookiename=222222;

Notice that with each request the cookies get appended and they have duplicate names.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

dheerajaggarwalcommented, Nov 18, 2019

Hi, sorry about the trouble. By mistake I was sending the cookie header by using the axios headers option. Your plugin also adds the same cookie from the cookie jar. That is why it was duplicated.

You may close this issue.

dheerajaggarwalcommented, Nov 18, 2019

Thanks for the quick response. Let me write a test (sample code) for this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Chrome is incorrectly storing and sending duplicate cookies ...
Chrome seems to send multiple cookie data to server if duplicated entries exist. Which one is sent first to server is perhaps unpedictable,...
Read more >
Duplicated Set-Cookie header handling · Issue #954 - GitHub
Client handle its and sends back the last value seen on subsequent redirects (there are two). Cookie: app_ei=ksoes2ehf18tbh8nct6lvamuu4; $Path=" ...
Read more >
145492 - Sending out duplicate cookies for domains with and ...
BACKGROUND: If a set-cookie header received from a site contains a domain attribute and the domain does not start with a dot, that...
Read more >
219650 – Cookies set with SameSite=Lax are not sent during ...
In my bug SameSite=lax cookie was set during redirect dance. > > 1. navigate (in our case it was >
Read more >
Duplicate, Google chose different canonical than user
Perhaps Google was right, and you should just take the URL they chose and use that as the canonical URL. c) implement a...
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 Post

No results found

github_iconTop Related Hashnode Post

No results found