File tree Expand file tree Collapse file tree 1 file changed +2
-13
lines changed Expand file tree Collapse file tree 1 file changed +2
-13
lines changed Original file line number Diff line number Diff line change @@ -241,19 +241,8 @@ and set a new ``Exception`` object, or do nothing::
241241
242242.. note ::
243243
244- If you want to overwrite the status code (which you should do not without a good
245- reason), set the ``X-Status-Code `` header::
246-
247- $response = new Response(
248- 'Error',
249- 404, // this status code will be ignored
250- array(
251- 'X-Status-Code' => 200 // this status code will actually be sent to the client
252- )
253- );
254-
255- If you do **not ** set the ``X-Status-Code `` header, then Symfony uses the following
256- logic to determine the status code:
244+ Symfony uses the following logic to determine the HTTP status code of the
245+ response:
257246
258247 * If :method: `Symfony\\ Component\\ HttpFoundation\\ Response::isClientError `,
259248 :method: `Symfony\\ Component\\ HttpFoundation\\ Response::isServerError ` or
You can’t perform that action at this time.
0 commit comments