Gatling doesn't read response body from some servers


I use quite ordinary scenario:

.check( => 200))

On some servers gatling reads full response, but on some the
bodyString is empty(0 length). The requests are the same
and I tried with curl both servers and got responses from
every server. What could be the reason for this kind of behavior.

Thanks in advance
Ivar Suisalu

It means the requests are not the same. Try spotting differences, in particular in HTTP headers.


The requests are read from csv feeder and headers are defined in the beginning of the scenario:

val httpProtocol = http
.baseUrl(configSource.getString(“simulation.serverUrl”)) // Here is the root for all relative URLs
.header(“Content-Type”, “application/xml”)
.header(“Expect”, “100-continue”)

So I think the requests are the same.


I debugged gatling and noticed that in problematic case
the first response headers were:

Transfer-Encoding → chunked
Vary → Accept-Encoding
{AsciiString@5844} “content-encoding” → gzip

so the response is chunked and gzipped.
Response from successful server wasn’t chunked.
So it has something to do with processing chunked


Please provide a way to reproduce your issue.


It is hard to provide testcase. I constructed with nginx and perl one mocking server, but this worked correctly.
What I noticed during debugging with problematic server, that gatling does link prefetch and after that
server responds Content-Length: 0 and this ends the conversation.