We currently write out results straight to the response, which makes it impossible to properly handle and report errors once the headers are sent.
Instead we should buffer the full output before writing it to the response.
This is especially important as we are now caching out output aggressively, and we don't want to cache partial output. The VE also gets a truncated 200 OK response on such mid-write failures which will surely mess up round-tripping.
Version: unspecified
Severity: normal