[Django] #36456: Improve content type negotiation for 500 response

12 views
Skip to first unread message

Django

unread,
Jun 11, 2025, 12:08:11 PMJun 11
to django-...@googlegroups.com
#36456: Improve content type negotiation for 500 response
-------------------------------------+-------------------------------------
Reporter: Jake Howard | Type:
| Cleanup/optimization
Status: new | Component: HTTP
| handling
Version: dev | Severity: Normal
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
`django.views.debug.technical_500_response` supports either a HTML or
plain text output. Currently, the client will be served HTML if they
support it, even if they preferred a plain text response.

Ideally, the user would be served HTML if it is their preference of the 2,
otherwise they'd be served plain text. If for whatever reason neither are
supported, serve plain text. This can be done with
`request.get_preferred_type`.
--
Ticket URL: <https://code.djangoproject.com/ticket/36456>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jun 12, 2025, 2:47:43 AMJun 12
to django-...@googlegroups.com
#36456: Improve content type negotiation for 500 response
--------------------------------------+------------------------------------
Reporter: Jake Howard | Owner: (none)
Type: Cleanup/optimization | Status: new
Component: HTTP handling | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Sarah Boyce):

* stage: Unreviewed => Accepted

--
Ticket URL: <https://code.djangoproject.com/ticket/36456#comment:1>

Django

unread,
Jun 13, 2025, 7:15:43 AMJun 13
to django-...@googlegroups.com
#36456: Improve content type negotiation for 500 response
-------------------------------------+-------------------------------------
Reporter: Jake Howard | Owner: Johanan
Type: | Oppong Amoateng
Cleanup/optimization | Status: assigned
Component: HTTP handling | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Johanan Oppong Amoateng):

* owner: (none) => Johanan Oppong Amoateng
* status: new => assigned

--
Ticket URL: <https://code.djangoproject.com/ticket/36456#comment:2>

Django

unread,
Jun 13, 2025, 8:29:38 AMJun 13
to django-...@googlegroups.com
#36456: Improve content type negotiation for 500 response
-------------------------------------+-------------------------------------
Reporter: Jake Howard | Owner: Johanan
Type: | Oppong Amoateng
Cleanup/optimization | Status: assigned
Component: HTTP handling | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Sarah Boyce):

* has_patch: 0 => 1
* needs_tests: 0 => 1

--
Ticket URL: <https://code.djangoproject.com/ticket/36456#comment:3>

Django

unread,
Jun 29, 2025, 11:09:05 AMJun 29
to django-...@googlegroups.com
#36456: Improve content type negotiation for 500 response
-------------------------------------+-------------------------------------
Reporter: Jake Howard | Owner: Johanan
Type: | Oppong Amoateng
Cleanup/optimization | Status: assigned
Component: HTTP handling | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls):

* needs_tests: 1 => 0

--
Ticket URL: <https://code.djangoproject.com/ticket/36456#comment:4>

Django

unread,
Jul 17, 2025, 6:50:30 AMJul 17
to django-...@googlegroups.com
#36456: Improve content type negotiation for 500 response
-------------------------------------+-------------------------------------
Reporter: Jake Howard | Owner: Johanan
Type: | Oppong Amoateng
Cleanup/optimization | Status: assigned
Component: HTTP handling | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Sarah Boyce):

* stage: Accepted => Ready for checkin

--
Ticket URL: <https://code.djangoproject.com/ticket/36456#comment:5>

Django

unread,
Jul 18, 2025, 4:18:35 AMJul 18
to django-...@googlegroups.com
#36456: Improve content type negotiation for 500 response
-------------------------------------+-------------------------------------
Reporter: Jake Howard | Owner: Johanan
Type: | Oppong Amoateng
Cleanup/optimization | Status: closed
Component: HTTP handling | Version: dev
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Sarah Boyce <42296566+sarahboyce@…>):

* resolution: => fixed
* status: assigned => closed

Comment:

In [changeset:"be8c9b19baeb4daf6bf2e603673714c7536b657c" be8c9b19]:
{{{#!CommitTicketReference repository=""
revision="be8c9b19baeb4daf6bf2e603673714c7536b657c"
Fixed #36456 -- Improved content type negotiation in technical 500 error
response.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/36456#comment:6>
Reply all
Reply to author
Forward
0 new messages