Invalid redirect to the same request
This looks like the result of https://github.com/gatling/gatling/issues/3480 , which is implemented by https://github.com/gatling/gatling/blob/3.4/gatling-http/src/main/scala/io/gatling/http/engine/response/RedirectProcessor.scala
As far as I can tell, the error should occur only when the requested URI equals the target redirect URI with same method and same set of cookies.
The app is indeed responding with a redirect to the same URI, but with a different cookie: the 302 response does contain a Set-Cookie with a different value.
This happens during the logout process, which is a quite common pattern: session invalidation occurs server-side and a new session id is generated, leading to setting the new session id as a cookie in the 302 response.
It looks like the Set-Cookie from the 302 response is disregarded...
Here is the HTTP dump from Gatling:
gatling.http.cookies -> CookieJar(Map(CookieKey(jsessionid,redact.host,/app) -> StoredCookie(JSESSIONID=4F49E96F2E86A78A2F507053811945A3, path=/app, HTTPOnly, SameSite=Lax,true,false,1607528569673)))
=========================
HTTP request:
GET http://redacted.host:8080/app/login/login.action
headers=
accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
accept-encoding: gzip, deflate
accept-language: fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3
user-agent: Mozilla/5.0 (X11; Linux x86_64; rv:46.0) Gecko/20100101 Firefox/46.0
referer: <redacted>
cookie: JSESSIONID=F0C5B71B32D1B58D37435407E68A1FD1
host: redacted.host
cookies=JSESSIONID=4F49E96F2E86A78A2F507053811945A3, path=/app, HTTPOnly, SameSite=Lax
As you can see, the trace shows the Set-Cookie from the response, but the same cookie value also appears in the request (bold red above). This is just not possible, because the cookie value in the response is generated during the processing of the request, which can therefore not contain the same value (or there is a huge flaw in the session id generation algorithm :-) ).
The cookie jar from the session dump (bold green) has indeed a different value, which is different from the logged request content.
Any clue about what's happening?
Regards
Pascal D
--
You received this message because you are subscribed to the Google Groups "Gatling User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gatling/6c1d1d78-d0ee-4b48-b61b-1e40054f692bn%40googlegroups.com.
From https://groups.google.com/g/gatling:
- Provide a Short, Self Contained, Correct (Compilable), Example (see http://sscce.org/)
================================================================================
2020-12-09 17:48:45 0s elapsed
---- Requests ------------------------------------------------------------------
> Global (OK=3 KO=1 )
> page1 (OK=1 KO=0 )
> page1 Redirect 1 (OK=1 KO=0 )
> page2 (OK=1 KO=0 )
> page1again (OK=0 KO=1 )
---- Errors --------------------------------------------------------------------
> Invalid redirect to the same request 1 (100.0%)
---- Redirect ------------------------------------------------------------------
[##########################################################################]100%
waiting: 0 / active: 0 / done: 1
================================================================================
Regards
Pascal D
--
You received this message because you are subscribed to the Google Groups "Gatling User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gatling/c0955de5-3ce2-4200-813e-bb22fd7b634bn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gatling/a515d04f-fe08-4053-a86f-6b8038e9dc6dn%40googlegroups.com.