Preserving cookies when followRedirects is enabled

I wanted to know if there’s a way to preserve the cookies from an initial HTTP 304 response. Dealing with a peculiar setup outside of my control, and I would like to preserve those cookies coming with the 304 response, but if the redirect is automatically followed, the cookies from the original jump-point are discarded.

Is there a way to achieve this? It’s possible with doing 2 requests, one which disables following redirects and saves the cookie, and another that follows the redirect, and uses Gatling context to pass those cookies using save. However, this is made difficult by certain implementation details on the server, which throttle the number of requests Gatling can make.

I would like to preserve those cookies coming with the 304 response, but if the redirect is automatically followed, the cookies from the original jump-point are discarded

No they’re not.
Or if you think there’s a bug:

  1. make sure to use Gatling 3.0.3
  2. provide requests and responses from a web browser and from Gatling (see instructions in logback.xml)