How can I print the entire response status line?

[i.n.h.c.h.TooLongHttpLineException: An HTTP line is larger than 4096 bytes.] I got an error like this.
The above error seems to be an error that occurs because the status line such as [HTTP/1.1 200 OK] exceeds 4096 bytes.
It doesn’t always happen when I send the same api request.

I want to check if the content of the error is true.
How can I print the status line of the response message composed like [HTTP/1.1 200 OK]?

The gatling version I am using is 3.9.0

Your HTTP response is malformed, 100% sure. Meaning it’s a bug in your server’s HTTP layer.

There’s currently no way to log the first 4096 bytes, this Exception is built and thrown in Netty’s code not in Gatling’s, see netty/ at 4.1 · netty/netty · GitHub

You can try to contribute this feature to Netty.
Or you can analyze your TCP traffic with Wireshark.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.