Improve capturing the legacy response
Improve capturing the legacy response

Make sure we don't leave an active output buffer behind when things
go south and an exception is thrown.

Additionally, don't try to use http_response_code() to figure out the
response status code if one has been returned from the $legacyExecutionCallback.

webfactory/legacy-integration-bundle