bodyBytes include response headers, thus failing equality check to RawFileBody

Using Gatling 3.3.0

I’m hitting a stumping situation while checking binary response bodies:

  • bodyBytes includes the response headers in the beginning
  • it is missing the end of the body, such that its total length is exactly correct according to the Content-Length response header
    Thus, it fails an equality check against a RawFileBody from a saved file. I figured out the above is happening with the usual debugging technique of saving bodyBytes into the session and then writing it out in an exec immediately after that.

This problem appears to happen only for binary response bodies, where the debug logging shows only <>. The debug logging looks perfectly normal. The web server is pretty standard (Apache + Tomcat), and causes no trouble for any other http clients.

Does this ring a bell at all?

Thanks!
Alex

Facepalm!
Thanks for reporting!

https://github.com/gatling/gatling/issues/3813