# Gatling in not managing some of the cookies because of which requests are failing(I matched the requests from the one captured in fiddler and authorization cookies is missing in the request formed by gatling)

**URL:** <https://community.gatling.io/t/gatling-in-not-managing-some-of-the-cookies-because-of-which-requests-are-failing-i-matched-the-requests-from-the-one-captured-in-fiddler-and-authorization-cookies-is-missing-in-the-request-formed-by-gatling/3520>\
**Category:** Gatling (Open-Source)\
**Created:** [January 25, 2017, 9:32pm UTC](https://community.gatling.io/t/gatling-in-not-managing-some-of-the-cookies-because-of-which-requests-are-failing-i-matched-the-requests-from-the-one-captured-in-fiddler-and-authorization-cookies-is-missing-in-the-request-formed-by-gatling/3520 "2017-01-25T21:32:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alok\_Dagar](https://avatars.discourse-cdn.com/v4/letter/a/d26b3c/32.png) [@Alok\_Dagar](https://community.gatling.io/u/Alok_Dagar)\
**Post date:** [January 25, 2017, 9:32pm UTC](https://community.gatling.io/t/gatling-in-not-managing-some-of-the-cookies-because-of-which-requests-are-failing-i-matched-the-requests-from-the-one-captured-in-fiddler-and-authorization-cookies-is-missing-in-the-request-formed-by-gatling/3520/1 "2017-01-25T21:32:24Z")

</div>

Hi,

I am not able to create a login scenario for my website since the authorization cookie which is set by one of the redirected call is not handled in gatling,… Kindly suggest how can I resolve this issue

---

<div class="post-metadata">

**Author:** ![Alok\_Dagar](https://avatars.discourse-cdn.com/v4/letter/a/d26b3c/32.png) [@Alok\_Dagar](https://community.gatling.io/u/Alok_Dagar)\
**Post date:** [January 25, 2017, 9:36pm UTC](https://community.gatling.io/t/gatling-in-not-managing-some-of-the-cookies-because-of-which-requests-are-failing-i-matched-the-requests-from-the-one-captured-in-fiddler-and-authorization-cookies-is-missing-in-the-request-formed-by-gatling/3520/2 "2017-01-25T21:36:09Z")

</div>

I am using 2.2.0-M2 version of gatling downloaded from maven repository… any help would be highly appreciated

---

<div class="post-metadata">

**Author:** ![Stephen](https://avatars.discourse-cdn.com/v4/letter/s/96bed5/32.png) [@Stephen](https://community.gatling.io/u/Stephen)\
**Post date:** [January 26, 2017, 8:17am UTC](https://community.gatling.io/t/gatling-in-not-managing-some-of-the-cookies-because-of-which-requests-are-failing-i-matched-the-requests-from-the-one-captured-in-fiddler-and-authorization-cookies-is-missing-in-the-request-formed-by-gatling/3520/3 "2017-01-26T08:17:53Z")

</div>

Hello,

Gatling handles cookies very well, can you provide the relevant parts of your code ?

---

<div class="post-metadata">

**Author:** ![Alok\_Dagar](https://avatars.discourse-cdn.com/v4/letter/a/d26b3c/32.png) [@Alok\_Dagar](https://community.gatling.io/u/Alok_Dagar)\
**Post date:** [January 26, 2017, 9:05am UTC](https://community.gatling.io/t/gatling-in-not-managing-some-of-the-cookies-because-of-which-requests-are-failing-i-matched-the-requests-from-the-one-captured-in-fiddler-and-authorization-cookies-is-missing-in-the-request-formed-by-gatling/3520/4 "2017-01-26T09:05:10Z")

</div>

[![](https://lh3.googleusercontent.com/-k3E8pAEVugA/WIm6QW8_e6I/AAAAAAAACx8/Y32HIKT2Q7MoQtojo0P1CYOyA-r4dYmRACLcB/s320/FiddlerImae.PNG)](https://lh3.googleusercontent.com/-k3E8pAEVugA/WIm6QW8_e6I/AAAAAAAACx8/Y32HIKT2Q7MoQtojo0P1CYOyA-r4dYmRACLcB/s1600/FiddlerImae.PNG)

[![](https://lh3.googleusercontent.com/-XGxADEe8d9c/WIm6MLUPJbI/AAAAAAAACx4/bFfLwLTf6pc4Ln2nJytPKWRvKPXeZVt2ACLcB/s320/Recorded_callbygatling_that_is_setting_authcookie.PNG)](https://lh3.googleusercontent.com/-XGxADEe8d9c/WIm6MLUPJbI/AAAAAAAACx4/bFfLwLTf6pc4Ln2nJytPKWRvKPXeZVt2ACLcB/s1600/Recorded_callbygatling_that_is_setting_authcookie.PNG)

Hi,

I am attaching the image of the call captured in fiddler that set the auth cookie and same call recorded in gatling.  
I have set the followredirect= false in recorder config since I wanted to capture the redirected call also… hope that is impacting the code  
Upon checking the log in gatling I found that in auth cookie is not sent in the subsequent calls.

Kindly let me know how can get this cookie and send it in the subsequent request.

---

<div class="post-metadata">

**Author:** ![Stephen](https://avatars.discourse-cdn.com/v4/letter/s/96bed5/32.png) [@Stephen](https://community.gatling.io/u/Stephen)\
**Post date:** [January 26, 2017, 2:45pm UTC](https://community.gatling.io/t/gatling-in-not-managing-some-of-the-cookies-because-of-which-requests-are-failing-i-matched-the-requests-from-the-one-captured-in-fiddler-and-authorization-cookies-is-missing-in-the-request-formed-by-gatling/3520/5 "2017-01-26T14:45:24Z")

</div>

I think that, when disabling followredirect in the recorder, it adds “.disableFollowRedirect” in the protocol (val httpProtocol). With that option, redirection will not be followed during the simulation.

Can you try to comment the “.disableFollowRedirect” and check if the cookie problem remains ?

---

<div class="post-metadata">

**Author:** ![Alok\_Dagar](https://avatars.discourse-cdn.com/v4/letter/a/d26b3c/32.png) [@Alok\_Dagar](https://community.gatling.io/u/Alok_Dagar)\
**Post date:** [January 26, 2017, 6:06pm UTC](https://community.gatling.io/t/gatling-in-not-managing-some-of-the-cookies-because-of-which-requests-are-failing-i-matched-the-requests-from-the-one-captured-in-fiddler-and-authorization-cookies-is-missing-in-the-request-formed-by-gatling/3520/6 "2017-01-26T18:06:15Z")

</div>

It worked… Thanks a lot for your help Stephen
