public function handleResponseFromPluginController(ResponseInterface $response, $blockInstanceName)
    {
//        trigger_error( //@TODO remove all this and throw exception
//            'Returning responses from plugin controllers is no longer supported.
//                 The following plugin attempted this: ' . $blockInstanceName .
//            ' Post to your own route to avoid this problem.',
//            E_USER_WARNING
//        );

        foreach ($response->getHeaders() as $header) {
            header($header->toString());
        }

//        //Some plugins used to return responses like this to signal a redirect to the login page
//        if ($response->getStatusCode() == 401) {
//            $href = '/login?redirect=' . urlencode($request->getUri()->getPath());;
//            echo "You are not authorized to view this page. Try <a href=\"{$href}\">logging in</a> first.";
//            exit;
//        }

        echo $response->getContent();
        exit;
    }