all scenarios

Lies about gzip encoding

broken-gzip · Status & reliability

Endpoint (Streamable HTTP)
https://chaos-mcp.thomascdnns.com/s/broken-gzip/mcp
On the wire — recorded from a real request
your clientchaos-mcp01initializePOST /s/broken-gzip/mcp200 OK · application/json · 1 ms"jsonrpc""2.0""id"1"result""this is not gzip"trueno Mcp-Session-Id headertools/list answers identically — every request does

Symptom

what you'll observe

Client errors with 'invalid gzip header' / decompression failure.

Cause

what this reproduces

Content-Encoding: gzip is set but the body is plain text (double-encoding middleware bug).

Fix

how you'd resolve it

Only set Content-Encoding when you actually compressed; let the framework manage it.

Try it with curl
bash
curl -sS -X POST \
  https://chaos-mcp.thomascdnns.com/s/broken-gzip/mcp \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '
"jsonrpc""2.0"
"id"1
"method""initialize"
"params"
"protocolVersion""2024-11-05"
"capabilities"
"clientInfo""name""curl""version""1"

'