bneradt opened a new pull request, #13415: URL: https://github.com/apache/trafficserver/pull/13415
## Problem ATS cannot reliably emit JSON error responses through header rewrite: literal bodies cannot select a MIME type, HRW4U interprets JSON braces as interpolation, fetched bodies lose their Content-Type, and conditional local files are unavailable. Body factory error pages are also hardcoded to HTML. ## Changes - Add optional Content-Type arguments to `set-body` and `set-body-from`. - Preserve the fetched response Content-Type unless a rule overrides it. - Add `set-body-from-file`, loaded once at rule-configuration time. - Add HRW4U literal JSON braces and the MIME-aware body forms. - Add configurable body-factory Content-Type metadata. - Document and test literal, fetched, file-backed, and body-factory bodies. The asynchronous URL form remains `READ_RESPONSE`-only because remap callbacks cannot suspend for an internal fetch. REMAP errors are handled by the literal or file-backed forms without origin or cache lookup. This includes the body-factory work from #12947 and preserves Bryan Call's original commits. Related: #10893 Fixes: #13393 Fixes: #11480 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
