Responses containing multiple content-encoding headers do not fully decompress the body, resulting in an unexpected value being received.
It appears that workerd looks for an exact value match in the content-encoding header when deciding what to do (https://github.com/cloudflare/workerd/blob/main/src/workerd/api/system-streams.c%2B%2B#L413-L428), and as a result does not seem to support stacked headers, as they're merged into a comma-delimited list that is not walked through from what i understand.
Example reproduction in a branch in our repo - https://github.com/cloudflare/vinext/blob/codex%2Fworkerd-stacked-content-encoding-repro/repros/workerd-stacked-content-encoding/README.md
Whereas, Node will decode for both of the values and return the expected response.
This surfaced in a customer's reproduction in cloudflare/vinext#2983
Responses containing multiple content-encoding headers do not fully decompress the body, resulting in an unexpected value being received.
It appears that workerd looks for an exact value match in the
content-encodingheader when deciding what to do (https://github.com/cloudflare/workerd/blob/main/src/workerd/api/system-streams.c%2B%2B#L413-L428), and as a result does not seem to support stacked headers, as they're merged into a comma-delimited list that is not walked through from what i understand.Example reproduction in a branch in our repo - https://github.com/cloudflare/vinext/blob/codex%2Fworkerd-stacked-content-encoding-repro/repros/workerd-stacked-content-encoding/README.md
Whereas, Node will decode for both of the values and return the expected response.
This surfaced in a customer's reproduction in cloudflare/vinext#2983