JSON response formatting depends on the casing of the Content-Type value. A response with APPLICATION/JSON or Application/Problem+JSON; charset=utf-8 is left compact by http --pretty=format --body URL, while the equivalent lowercase type is formatted.
For a response body {"message":"ok"}, expected output is:
Actual output retains {"message":"ok"} on one line. Media type names are case-insensitive. The JSON formatter's substring checks currently use the original case.
Reproduced through HTTPie's CLI entry with responses serving these exact content types, against master 5b604c3, Python 3.12.13 / macOS. Both new regressions fail on the original formatter.
Investigated with OpenAI Codex assistance.
JSON response formatting depends on the casing of the Content-Type value. A response with
APPLICATION/JSONorApplication/Problem+JSON; charset=utf-8is left compact byhttp --pretty=format --body URL, while the equivalent lowercase type is formatted.For a response body
{"message":"ok"}, expected output is:{ "message": "ok" }Actual output retains
{"message":"ok"}on one line. Media type names are case-insensitive. The JSON formatter's substring checks currently use the original case.Reproduced through HTTPie's CLI entry with responses serving these exact content types, against master 5b604c3, Python 3.12.13 / macOS. Both new regressions fail on the original formatter.
Investigated with OpenAI Codex assistance.