Skip to content

fix(mux-h2): DATA on a backend response without a body is forwarded to the client #1772

Closed

Description

@FlorentinDUBOIS

A response to HEAD, a 204 or a 304 has no content (RFC 9110 §6.4.1); an H2 response of that kind that carries DATA with a payload is malformed (RFC 9113 §8.1.1).

Sōzu forwards such DATA from an H2 backend: an H1 client receives the payload after the response head (with a chunk-size line under chunked framing) and reads it as the start of the next response on a keep-alive connection. The content-length mismatch checks of handle_data_frame are skipped for these responses, so nothing stops it.

Expected: the backend stream is reset with PROTOCOL_ERROR and the payload is never forwarded to the client.

Follows #1761.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions