Are there any restrictions for Strings in session

Hi there,
i use Gatling 2 Nightly build.

If i store a string “foo#1” under the name “baz” in the session object (a println shows that it is really there) and try to access it by “${bas}”, only “foo” is returned without “#1”.

Are there any restrictions for Strings to take into account?

Thanks in advance

bas != baz ?


typo in my question, “${baz}” is used :wink:

There isn’t any restrictions.
What does your scenario looks like ?

Can’t send attachement in Google Groups.
Can you send it to my private email ?

I get a JSON-Object as response from a Rest call which contains a part of an URL to get further information.
This information has the form similar to “foo#1” and is stored in the session object under key “baz”.

if I try a get with url “someUrl/${baz}” to get the surplus information Gatling uses “someUrl/foo” instead

As a test I replaced foo#1 by foo_1 and everything works fine.

With this line:


I’m getting the following log:

11:19:48.214 [INFO] i.g.h.a.HttpRequestAction$ - Sending request=Home uri=http://localhost:5000/: scenario=Basic Scenario, userId=1122385713565746701-9

There is a bug in the URI handling.

I tried URI-Handling in Java, it’s IMHO correct.
A “#” designates an URI-fragment and http://localhost/foo#1 is stored correctly in a URI-Object and the toString-Method returns the correct string http://localhost/foo#1

Maybe get does not handle fragments

Clients MUSTN’T send fragment to the server, as per HTTP.

Hi Stéphane, and thanks for the hint. I will send a CR to the designer of the rest api to make it standards compliant.