Description
Continuing the discussion from #14608...
A quick recap of the situation so far:
#14478 introduced inline dumps. This breaks the response when the response content type is not plain text or HTML (e.g. JSON).
#14609 alleviated the probem somewhat, by suppressing the inline dumps when the request can be detected as XHR (X-Requested-With
header) or CORS (Origin
header).
#14640 added the debug.dump_destination
configuration option, which made it possible to unconditionally suppress inline dumps (usually per environment). This is not ideal as it also affects the CLI and HTML output.
There is also the greater issue that the request becomes entirely missing from the profiler when an inline dump is done inappropriately... I'd argue that this should never be allowed to happen, regardless of what we choose to do about such inappropriate inline dumps.
Suggestions:
- Perhaps add an argument to
dump
to suppress inline dump.