remove headers that have been captured in symfony response.
capture non-empty buffer for exception response.
only set request when it is not false.
Merge branch 'master' into develop