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::
241
241
242
242
.. note ::
243
243
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:
257
246
258
247
* If :method: `Symfony\\ Component\\ HttpFoundation\\ Response::isClientError `,
259
248
:method: `Symfony\\ Component\\ HttpFoundation\\ Response::isServerError ` or
You can’t perform that action at this time.
0 commit comments