Relaying cookies in subsequent requests

I seem to have a problem with relaying session identification cookie to subsequent requests after initial login.
Here is a very simple simulation that I am trying to run (with actual URLs removed):

package basic

import com.excilys.ebi.gatling.core.Predef._
import com.excilys.ebi.gatling.http.Predef._
import com.excilys.ebi.gatling.jdbc.Predef._
import com.excilys.ebi.gatling.http.Headers.Names._
import akka.util.duration._
import bootstrap._

class MluiSearchAPISimulation extends Simulation {

val main_httpConf = httpConfig

val main_scn = scenario(“Index (empty initial index)”)
.pause(2 seconds)
.pause(2 seconds)
.param(“imageTitle”,“sunset in the mountains.jpg”)
.param(“imageDescription”,“beautiful sunset in the mountains”)
.param(“tags”,“sunset mountains”)

// run the scenario with 1 user making 1 index index request

I need a specific cookie named “sso_so” to be relayed to my local server after login. That cookie serves as a session identifier of sorts.
What I have noticed, is that in the response that I get from the login request, I get the following 4 headers( this is according to Chrome built-in debugger):

  1. Set-Cookie:
    BIGipServerD100_SSO=1404872896.36895.0000; Path=/

  2. Set-Cookie:
    d1_sso_cid=d1-sso952; Path=/; domain=.; Secure; HttpOnly

  3. Set-Cookie:
    Domain=.; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/

  4. Set-Cookie:
    sso_so=QPCaGeod2Mlsi9ICU1Jbo9PiT24rNO7H3GDXJs4tWbFglooOHHIF8mJDcLx; Path=/; domain=.; Secure; HttpOnly

As you can see, the last header contains the necessary cookie. But it somehow does not get relayed when I send the last request in the chain.

Could it be that:

a. Since domain of login server and my local server are different - Gatling does not relay the cookie?
b. Since there is more than one header in the response with the name “Set-Cookie”, the one with the right cookie value gets overridden somewhere inside of Gatling?

Thanks in advance for your time!


Why version of Gatling do you use?

If I am not mistaken, 1.4.1.

A similar issue was fixed in 1.4.3:

Could you upgrade and try again, please?

I will try in the next few hours. Will report if the issue went away.
Thank you for quick response!

Hi Stéphane
1.4.3 build worked for the scenario that I was describing.
Problem solved.
Thanks for quick response!

I’m glad :slight_smile: