# cookies are not getting saved, if the Set-Cookie has Expires parameter

**URL:** <https://community.gatling.io/t/cookies-are-not-getting-saved-if-the-set-cookie-has-expires-parameter/884>\
**Category:** Gatling (Open-Source)\
**Created:** [March 19, 2014, 7:36am UTC](https://community.gatling.io/t/cookies-are-not-getting-saved-if-the-set-cookie-has-expires-parameter/884 "2014-03-19T07:36:58Z")\
**Posts on this page:** 13\
**Page:** 2

<div class="post-metadata">

**Author:** ![Excilys](https://avatars.discourse-cdn.com/v4/letter/e/8797f3/32.png) [@Excilys](https://community.gatling.io/u/Excilys)\
**Post date:** [March 23, 2014, 12:31am UTC](https://community.gatling.io/t/cookies-are-not-getting-saved-if-the-set-cookie-has-expires-parameter/884/21 "2014-03-23T00:31:31Z")

</div>

@Rob: I’ve just pushed a fix: [https://github.com/excilys/gatling/issues/1732](https://github.com/excilys/gatling/issues/1732)

We did take the path into account, but in case of multiple cookies with the same name, we were erroneously sending only one, instead of sending all of them but sorted.

Please tell me if it works properly now,  
Cheers,

Stéphane

---

<div class="post-metadata">

**Author:** ![Rob\_Zienert](https://avatars.discourse-cdn.com/v4/letter/r/ea5d25/32.png) [@Rob\_Zienert](https://community.gatling.io/u/Rob_Zienert)\
**Post date:** [March 24, 2014, 3:09pm UTC](https://community.gatling.io/t/cookies-are-not-getting-saved-if-the-set-cookie-has-expires-parameter/884/22 "2014-03-24T15:09:11Z")

</div>

Unfortunately, the other cookies are still not being set for the “/app/consumer” path - the results are looking the same.

---

<div class="post-metadata">

**Author:** ![Excilys](https://avatars.discourse-cdn.com/v4/letter/e/8797f3/32.png) [@Excilys](https://community.gatling.io/u/Excilys)\
**Post date:** [March 24, 2014, 3:12pm UTC](https://community.gatling.io/t/cookies-are-not-getting-saved-if-the-set-cookie-has-expires-parameter/884/23 "2014-03-24T15:12:09Z")

</div>

Could you send the new Charles logs for Gatling, please?

---

<div class="post-metadata">

**Author:** ![Rob\_Zienert](https://avatars.discourse-cdn.com/v4/letter/r/ea5d25/32.png) [@Rob\_Zienert](https://community.gatling.io/u/Rob_Zienert)\
**Post date:** [March 24, 2014, 3:36pm UTC](https://community.gatling.io/t/cookies-are-not-getting-saved-if-the-set-cookie-has-expires-parameter/884/24 "2014-03-24T15:36:20Z")

</div>

We just tried clearing out our Gradle cache as well, just in case… here’s the trace: [http://cl.ly/0g1i0f1v0d3e](http://cl.ly/0g1i0f1v0d3e)

CONFIDENTIAL COMMUNICATION:

This email may contain confidential or legally privileged material, and is for the sole use of the intended recipient. Use or distribution by an unintended recipient is prohibited, and may be a violation of law. If you believe that you received this email in error, please do not read, forward, print or copy this email or any attachments. Please delete the email and all attachments, and inform the sender that you have deleted the email and all attachments. Thank you.

---

<div class="post-metadata">

**Author:** ![Excilys](https://avatars.discourse-cdn.com/v4/letter/e/8797f3/32.png) [@Excilys](https://community.gatling.io/u/Excilys)\
**Post date:** [March 24, 2014, 9:20pm UTC](https://community.gatling.io/t/cookies-are-not-getting-saved-if-the-set-cookie-has-expires-parameter/884/25 "2014-03-24T21:20:23Z")

</div>

I found a bug in the path matching attribute and pushed a fix.  
Please tell me that it works now… ☹

---

<div class="post-metadata">

**Author:** ![Rob\_Zienert](https://avatars.discourse-cdn.com/v4/letter/r/ea5d25/32.png) [@Rob\_Zienert](https://community.gatling.io/u/Rob_Zienert)\
**Post date:** [March 26, 2014, 3:21pm UTC](https://community.gatling.io/t/cookies-are-not-getting-saved-if-the-set-cookie-has-expires-parameter/884/26 "2014-03-26T15:21:51Z")

</div>

HI Stephane,

Sorry it took so long to respond, I was having trouble pulling down the latest snapshots. It didn’t work again - same results as before. I’m looking to change all of our tomcat apps to assign different cookie identifiers instead.

---

<div class="post-metadata">

**Author:** ![Excilys](https://avatars.discourse-cdn.com/v4/letter/e/8797f3/32.png) [@Excilys](https://community.gatling.io/u/Excilys)\
**Post date:** [March 26, 2014, 3:28pm UTC](https://community.gatling.io/t/cookies-are-not-getting-saved-if-the-set-cookie-has-expires-parameter/884/27 "2014-03-26T15:28:34Z")

</div>

Then I don’t get it?!  
I know this is time consuming for you, and I’m sorry for that, but could you get me the new Charles logs, please?

---

<div class="post-metadata">

**Author:** ![Excilys](https://avatars.discourse-cdn.com/v4/letter/e/8797f3/32.png) [@Excilys](https://community.gatling.io/u/Excilys)\
**Post date:** [March 26, 2014, 3:36pm UTC](https://community.gatling.io/t/cookies-are-not-getting-saved-if-the-set-cookie-has-expires-parameter/884/28 "2014-03-26T15:36:17Z")

</div>

Oh wait, let me check something, I think I get it!

---

<div class="post-metadata">

**Author:** ![Excilys](https://avatars.discourse-cdn.com/v4/letter/e/8797f3/32.png) [@Excilys](https://community.gatling.io/u/Excilys)\
**Post date:** [March 26, 2014, 3:46pm UTC](https://community.gatling.io/t/cookies-are-not-getting-saved-if-the-set-cookie-has-expires-parameter/884/29 "2014-03-26T15:46:39Z")

</div>

I get it!  
Gatling’s CookieJar is fine, the problem is downstream in AsyncHttpClient that filters Cookies with the same name, which is wrong because it’s perfectly legal!

Let me see if I can work around this in Gatling, or if I have to fix AHC first.

Stay tuned!

---

<div class="post-metadata">

**Author:** ![Rob\_Zienert](https://avatars.discourse-cdn.com/v4/letter/r/ea5d25/32.png) [@Rob\_Zienert](https://community.gatling.io/u/Rob_Zienert)\
**Post date:** [March 26, 2014, 3:58pm UTC](https://community.gatling.io/t/cookies-are-not-getting-saved-if-the-set-cookie-has-expires-parameter/884/30 "2014-03-26T15:58:51Z")

</div>

Cheers, Stephane, I appreciate you looking into this so deeply. 🙂

CONFIDENTIAL COMMUNICATION:

This email may contain confidential or legally privileged material, and is for the sole use of the intended recipient. Use or distribution by an unintended recipient is prohibited, and may be a violation of law. If you believe that you received this email in error, please do not read, forward, print or copy this email or any attachments. Please delete the email and all attachments, and inform the sender that you have deleted the email and all attachments. Thank you.

---

<div class="post-metadata">

**Author:** ![Excilys](https://avatars.discourse-cdn.com/v4/letter/e/8797f3/32.png) [@Excilys](https://community.gatling.io/u/Excilys)\
**Post date:** [March 26, 2014, 4:31pm UTC](https://community.gatling.io/t/cookies-are-not-getting-saved-if-the-set-cookie-has-expires-parameter/884/31 "2014-03-26T16:31:18Z")

</div>

[https://github.com/excilys/gatling/issues/1749](https://github.com/excilys/gatling/issues/1749)

I hope this will be the last one…

Crossing fingers…

---

<div class="post-metadata">

**Author:** ![Rob\_Zienert](https://avatars.discourse-cdn.com/v4/letter/r/ea5d25/32.png) [@Rob\_Zienert](https://community.gatling.io/u/Rob_Zienert)\
**Post date:** [March 26, 2014, 10:53pm UTC](https://community.gatling.io/t/cookies-are-not-getting-saved-if-the-set-cookie-has-expires-parameter/884/32 "2014-03-26T22:53:08Z")

</div>

Delightful news, Stéphane: Things seem to be working now! Thanks for all the work on this.

CONFIDENTIAL COMMUNICATION:

This email may contain confidential or legally privileged material, and is for the sole use of the intended recipient. Use or distribution by an unintended recipient is prohibited, and may be a violation of law. If you believe that you received this email in error, please do not read, forward, print or copy this email or any attachments. Please delete the email and all attachments, and inform the sender that you have deleted the email and all attachments. Thank you.

---

<div class="post-metadata">

**Author:** ![Excilys](https://avatars.discourse-cdn.com/v4/letter/e/8797f3/32.png) [@Excilys](https://community.gatling.io/u/Excilys)\
**Post date:** [March 26, 2014, 10:58pm UTC](https://community.gatling.io/t/cookies-are-not-getting-saved-if-the-set-cookie-has-expires-parameter/884/33 "2014-03-26T22:58:53Z")

</div>

Yippee!

Thanks a lot for helping me debugging this!

[Previous page](https://community.gatling.io/t/cookies-are-not-getting-saved-if-the-set-cookie-has-expires-parameter/884.md?page=1)
