From 12c1557060fc94fe5e1fbddc4578a4e29d38f77c Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Tue, 10 Jun 2025 23:00:25 +0100 Subject: Fixed #36447 -- Selected preferred media type based on quality. When matching which entry in the `Accept` header should be used for a given media type, the specificity matters. However once those are resolved, only the quality matters when selecting preference. Regression in c075508b4de8edf9db553b409f8a8ed2f26ecead. Thank you to Anders Kaseorg for the report. --- docs/ref/request-response.txt | 2 +- docs/releases/5.2.4.txt | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/ref/request-response.txt b/docs/ref/request-response.txt index 805b36023a..9354505a9f 100644 --- a/docs/ref/request-response.txt +++ b/docs/ref/request-response.txt @@ -478,7 +478,7 @@ Methods None (For further details on how content negotiation is performed, see - :rfc:`7231#section-5.3.2`.) + :rfc:`9110#section-12.5.1`.) Most browsers send ``Accept: */*`` by default, meaning they don't have a preference, in which case the first item in ``media_types`` would be diff --git a/docs/releases/5.2.4.txt b/docs/releases/5.2.4.txt index 028ef68290..ebfa556f23 100644 --- a/docs/releases/5.2.4.txt +++ b/docs/releases/5.2.4.txt @@ -9,4 +9,6 @@ Django 5.2.4 fixes several bugs in 5.2.3. Bugfixes ======== -* ... +* Fixed a regression in Django 5.2.2 where :meth:`HttpRequest.get_preferred_type() + ` incorrectly preferred more + specific media types with a lower quality (:ticket:`36447`). -- cgit v1.3