From 18f8437a487f3aeba800bd99235f775716013376 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Thu, 16 Mar 2017 15:28:26 +0100 Subject: [PATCH] Removed any reference to X-Status-Code --- reference/events.rst | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/reference/events.rst b/reference/events.rst index cbc6fbf09b0..a43fa444d20 100644 --- a/reference/events.rst +++ b/reference/events.rst @@ -241,19 +241,8 @@ and set a new ``Exception`` object, or do nothing:: .. note:: - If you want to overwrite the status code (which you should do not without a good - reason), set the ``X-Status-Code`` header:: - - $response = new Response( - 'Error', - 404, // this status code will be ignored - array( - 'X-Status-Code' => 200 // this status code will actually be sent to the client - ) - ); - - If you do **not** set the ``X-Status-Code`` header, then Symfony uses the following - logic to determine the status code: + Symfony uses the following logic to determine the HTTP status code of the + response: * If :method:`Symfony\\Component\\HttpFoundation\\Response::isClientError`, :method:`Symfony\\Component\\HttpFoundation\\Response::isServerError` or