I’m running into this error where k6 fails to decompress a response body where it shouldn’t, given that, well, it’s a 204 http response. Here’s k6’s output with the http-debug=full
flag. This was run against our loadtest instance on gcloud that replicates production. It happens consistently with all endpoints that return 204.
INFO[0005] Response:
HTTP/2.0 204 No Content
Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
Cache-Control: no-store
Content-Encoding: gzip
Content-Type: application/json;charset=utf-8
Date: Wed, 01 Nov 2023 19:19:28 GMT
Server: nginx
Set-Cookie: NO-XSRF-TOKEN=; Path=/; Expires=Fri, 01-Dec-2023 17:30:50 GMT; Secure
Set-Cookie: JWT-Cookie=; Path=/; Expires=Fri, 01-Dec-2023 17:30:50 GMT; HttpOnly; Secure; SameSite=Lax
Strict-Transport-Security: max-age=31536000
Vary: Accept-Encoding
Via: 1.1 google
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-Xss-Protection: 1; mode=block
group="::Upload::Delete File" iter=0 request_id=e3419c60-b2db-4eb8-7899-142f96105283
scenario=upload_smoke_test source=http-debug vu=1 file=Basic
WARN[0005] Request Failed error="error decompressing response body (EOF)"
The same error doesn’t happen locally where we don’t have nginx. I tried creating an expressjs app to reproduce and isolate the error, but it seems to only happen when nginx is involved.