gatling.http.referer issue with request context

85 views
Skip to first unread message

Wajih A

unread,
Jun 1, 2021, 1:32:08 AM6/1/21
to Gatling User Group
I have a simulation that is resulting in a 404 due to the "gatling.http.referer" adding an extra context to the request.   Here is a TRACE.  Notice the "am/am" in the Session object.  The "referer" in the HTTP headers is ok.  Is this a bug or do i need to clear the session after each request in the feeder? 

Note that previously the exact same simulation works with version 3.1.2.  Some irrelevant data has been removed below to make it terse.


<<<<<<<<<<<<<<<<<<<<<<<<<
00:26:36.884 [DEBUG] i.g.h.e.r.DefaultStatsProcessor - Request 'Get SAML response' failed for user 1: status.find.is(200), but actually found 404
00:26:36.885 [TRACE] i.g.h.e.r.DefaultStatsProcessor -
>>>>>>>>>>>>>>>>>>>>>>>>>>
Request:
Get SAML response: KO status.find.is(200), but actually found 404
=========================

Session:
Session(SAML Flow,1,HashMap(saml2ContinueUrl -> https://prod.example.com:443/am/saml2/continue/metaAlias/idp?secondVisitUrl%3D/am/SSORedirect/metaAlias/idp?ReqID%253Ds268ef0886415d4b64af9ffa97f548da78dd0c0f4b&AMAuthCookie=, gatling.http.cache.baseUrl -> https://prod.example.com:443/am, 8202c1a9-f699-4664-a7a5-158fdcf5300e -> 0, idpSsoEndpoint -> https://prod.example.com/am/SSORedirect/metaAlias/idp?SAMLRequest=3nl0CL5rg6hrkLSFcXeOUR%2BgwjqU8GCdiGUORQWyiY9Y4f8rwLT5nj960I5iV///vz/4A, gatling.http.cache.dns -> io.gatling.http.resolver.ShufflingNameResolver@2fd010e0, username -> user.720, tokenid -> sgWrB2NAcNagg-FqBUs2X3RTTxY.*AAAAIwMQ..*, timestamp.8202c1a9-f699-4664-a7a5-158fdcf5300e -> 1622507196587, secondVisitUrl -> /am/SSORedirect/metaAlias/idp?ReqID=s268ef0886415d4b64af9ffa97f548da78dd0c0f4b&index=null&acsURL=https://prod-sp.example.org/am/Consumer/metaAlias/sp&spEntityID=sp&binding=urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST, saml2Request -> eyJ0eXAiOiJKV4i_hiimUw, gatling.http.ssl.sslContexts -> io.gatling.http.util.SslContexts@4e92e3fd, gatling.http.referer -> https://prod.example.com/am/am/SSORedirect/metaAlias/idp?ReqID=s268ef0886415d4b64af9ffa97f548da78dd0c0f4b&index=null&acsURL=https://prod-sp.example.org/am/Consumer/metaAlias/sp&spEntityID=sp&binding=urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST, gatling.http.cookies -> CookieJar(Map(CookieKey(route,prod.example.com,/am) -> StoredCookie(route=1622507197.806.49.816210, path=/am, secure, HTTPOnly,true,false,1622507196834), CookieKey(amlbcookie,prod.example.com,/) -> StoredCookie(amlbcookie=01, path=/, secure, HTTPOnly, SameSite=None,true,false,1622507196834), CookieKey(iplanetdirectorypro,prod.example.com,/) -> StoredCookie(iPlanetDirectoryPro=sgWrB2NAcNagg-FqBUs2X3RTTxY.*AAJTSQAlMxAAIwMQ..*,true,false,1622507196868), CookieKey(jsessionid,prod.example.com,/am) -> StoredCookie(JSESSIONID=9163CDAC706A7B10C79867DB1BCAD7AA, path=/am, secure, HTTPOnly,true,false,1622507196872))), password -> abcd1234),KO,List(ExitAsapLoopBlock(8202c1a9-f699-4664-a7a5-158fdcf5300e,io.gatling.core.session.package$RichExpression$$$Lambda$506/0x0000000100587040@51a0724b,io.gatling.core.action.Exit@13157e8)),io.gatling.core.protocol.ProtocolComponentsRegistry$$Lambda$587/0x000000010064c840@71c28341,io.netty.channel.epoll.EpollEventLoop@c68a5f8)
=========================
HTTP request:
POST https://prod.example.com/am/am/SSORedirect/metaAlias/idp?ReqID=s268ef0886415d4b64af9ffa97f548da78dd0c0f4b&index=null&acsURL=https://prod-sp.example.org/am/Consumer/metaAlias/sp&spEntityID=sp&binding=urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST
headers:
    accept-language: en-US,en;q=0.5
    accept-encoding: gzip, deflate
    accept: */*
    user-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:44.0) Gecko/20100101 Firefox/44.0
    referer: https://prod.example.com/am/saml2/continue/metaAlias/idp?secondVisitUrl%3D/am/SSORedirect/metaAlias/idp?ReqID%253Ds268ef0886415d4b64af9ffa97f548da78dd0c0f4b&AMAuthCookie=
    cookie: route=1622507197.806.49.816210; JSESSIONID=9163CDAC706A7B10C79867DB1BCAD7AA; amlbcookie=01; iPlanetDirectoryPro=sgWrB2NAcNagg-FqBUs2X3RTTxY.*AAJQ..*
    origin: https://prod.example.com
    host: prod.example.com
    content-type: application/x-www-form-urlencoded
    content-length: 890
cookies:
    route=1622507197.806.49.816210, path=/am, secure, HTTPOnly
    JSESSIONID=9163CDAC706A7B10C79867DB1BCAD7AA, path=/am, secure, HTTPOnly
    mylbcookie=01, path=/, secure, HTTPOnly, SameSite=None

slan...@gatling.io

unread,
Jun 1, 2021, 1:41:52 AM6/1/21
to gat...@googlegroups.com
Which version are you trying to upgrade to ?
Please provide logs with the Set-Cookie response header.

Le 1 juin 2021 à 07:32, Wajih A <wajih...@gmail.com> a écrit :


--
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/8b698228-b2e6-4119-9191-e9cbb298d4d1n%40googlegroups.com.

Stéphane LANDELLE

unread,
Jun 1, 2021, 3:21:30 AM6/1/21
to gat...@googlegroups.com
Please provide the full logs, including previous requests.

Logo Stéphane Landelle
Chief Technical Officer
twitter: @slandelle
site:
gatling.io



Wajih A

unread,
Jun 1, 2021, 7:58:00 AM6/1/21
to Gatling User Group
Attached.
typescript.404.public.txt

Wajih A

unread,
Jun 1, 2021, 9:04:29 AM6/1/21
to Gatling User Group
I must point out that the previously attahed full log trace is actually from 3.3.1 but i experience the exact same issue with 3.6.0.  I can provide the 3.6.0 logs if need be.

Stéphane LANDELLE

unread,
Jun 1, 2021, 9:06:19 AM6/1/21
to gat...@googlegroups.com
So this am/am in the url and referer is already there in 3.3.1. Looks like a bug in your code.


Logo Stéphane Landelle
Chief Technical Officer
twitter: @slandelle
site:
gatling.io



Stéphane LANDELLE

unread,
Jun 1, 2021, 9:08:34 AM6/1/21
to gat...@googlegroups.com
I suspect you're hacking the "gatling.http.referer" attribute yourself and are overriding the value Gatling sets.


Logo Stéphane Landelle
Chief Technical Officer
twitter: @slandelle
site:
gatling.io



Wajih A

unread,
Jun 1, 2021, 9:43:12 AM6/1/21
to Gatling User Group
Entirely possible that there is a bug in my code.  But this code works with 3.1.2.  Let me try and get the TRACE from 3.1.2.

Wajih A

unread,
Jun 1, 2021, 9:45:10 AM6/1/21
to Gatling User Group
So i inherited the code but as far as i can tell this attribute is not being tinkered with.  I will double check tough.

Stéphane LANDELLE

unread,
Jun 1, 2021, 9:45:24 AM6/1/21
to gat...@googlegroups.com
Sorry, but I won't have time to try to spot the difference between your different versions.
Please investigate yourself and let me know once you've spotted something.


Logo Stéphane Landelle
Chief Technical Officer
twitter: @slandelle
site:
gatling.io



Reply all
Reply to author
Forward
0 new messages