Opened 3 months ago

Closed 7 weeks ago

#36456 closed Cleanup/optimization (fixed)

Improve content type negotiation for 500 response

Reported by: Jake Howard Owned by: Johanan Oppong Amoateng
Component: HTTP handling Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

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.

Change History (6)

comment:1 by Sarah Boyce, 3 months ago

Triage Stage: UnreviewedAccepted

comment:2 by Johanan Oppong Amoateng, 3 months ago

Owner: set to Johanan Oppong Amoateng
Status: newassigned

comment:3 by Sarah Boyce, 3 months ago

Has patch: set
Needs tests: set

comment:4 by Jacob Walls, 2 months ago

Needs tests: unset

comment:5 by Sarah Boyce, 7 weeks ago

Triage Stage: AcceptedReady for checkin

comment:6 by Sarah Boyce <42296566+sarahboyce@…>, 7 weeks ago

Resolution: fixed
Status: assignedclosed

In be8c9b19:

Fixed #36456 -- Improved content type negotiation in technical 500 error response.

Note: See TracTickets for help on using tickets.
Back to Top