Can we make Gatling follow redirect response code 308?

Hello

I’m using Gatling to test a server which runs as a Google cloud container and redirects http requests to https with a response code 308. Gatling doesn’t follow the 308 redirect and returns an error.
I checked the Gatling documentation, it indicates that
Follow redirects

By default Gatling automatically follow redirects in case of 301, 302, 303 or 307 response status code, you can disable this behavior with .disableFollowRedirect.

Is it possible to make Gatling to follow response code 308?

Thanks!

Peter

I dig around Gatling’s code and found this: https://github.com/gatling/gatling/blob/master/gatling-http/src/main/scala/io/gatling/http/util/HttpHelper.scala#L43

This is clearly stating that “Permanent Redirect” aka 308 is part of the automatic follow redirect feature. Thank you for catching the missing information inside the documentation!

About your own issue, I managed to make it work on version 3.1.1 of the gatling bundle, what version are you using?
Also, make sure your first request have a “Location” header, otherwise you’ll get a “KO Redirect status, yet no Location header”.

Cheers,

Thanks much for digging into this and the hint! Guillaume. For some compatibility reason, we are still using 2.3.1. I’ll add the location header to the first request and see if it can help.

Cheers!