podman icon indicating copy to clipboard operation
podman copied to clipboard

Compat API: negotiate events content type via Accept

Open cvas22 opened this issue 2 weeks ago • 1 comments

Feature request description

Compat GET /events always answers with application/json. Newer Docker clients send an Accept header and pick how to read the stream from the response Content-Type, so we should negotiate it: application/x-ndjson and application/json-seq from API v1.52, and application/jsonl from v1.53.

Suggest potential solution

Read Accept in the compat events handler, pick the best supported type for the requested API version, and fall back to application/json for older versions and for the libpod endpoint.

Have you considered any alternatives?

No

Additional context

Split out of the events Accept items in #30164 (v1.52) and #30165 (v1.53).

cvas22 avatar Nov 20 '26 07:11 cvas22

/assign

cvas22 avatar Nov 20 '26 07:11 cvas22