@@ -269,6 +269,19 @@ If you need to get full access to parsed data from ``Accept``, ``Accept-Language
269269 $accepts = AcceptHeader::fromString($request->headers->get('Accept'))
270270 ->all();
271271
272+ The default values that can be optionally included in the ``Accept-* `` headers
273+ are also supported::
274+
275+ $acceptHeader = 'text/plain;q=0.5, text/html, text/*;q=0.8, */*;q=0.3';
276+ $accept = AcceptHeader::fromString($acceptHeader);
277+
278+ $quality = $accept->get('text/xml')->getQuality(); // $quality = 0.8
279+ $quality = $accept->get('application/xml')->getQuality(); // $quality = 0.3
280+
281+ ..versionadded ::4.1
282+ The support of default values in the ``Accept-* `` headers was introduced in
283+ Symfony 4.1.
284+
272285Accessing other Data
273286~~~~~~~~~~~~~~~~~~~~
274287
@@ -403,7 +416,7 @@ of methods to manipulate the HTTP headers related to the cache:
403416..note ::
404417
405418 The methods:method: `Symfony\\ Component\\ HttpFoundation\\ Response::setExpires `,
406- :method: `Symfony\\ Component\\ HttpFoundation\\ Response::setLastModified ` and
419+ :method: `Symfony\\ Component\\ HttpFoundation\\ Response::setLastModified ` and
407420:method: `Symfony\\ Component\\ HttpFoundation\\ Response::setDate ` accept any
408421 object that implements ``\DateTimeInterface ``, including immutable date objects.
409422