Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#20328 closed Cleanup/optimization (duplicate)

Add support to use a custom reason-phrase in response's status line

Reported by: Anler Hp Owned by: nobody
Component: HTTP handling Version: 1.5
Severity: Normal Keywords: http response status line reason phrase
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


HTTP protocol uses the reason-phrase in the response's status line as a message meant solely for human consumption so is perfectly valid to change that phrase for whatever the api designer wants.
HttpResponse class should allow users to change the reason-phrase through a status_text attribute for example.

Link to patch: Patch

Attachments (1)

http_status_text.patch (746 bytes) - added by Anler Hp 5 years ago.

Download all attachments as: .zip

Change History (4)

Changed 5 years ago by Anler Hp

Attachment: http_status_text.patch added

comment:1 Changed 5 years ago by Aymeric Augustin

Duplicate of #12747.

If you have a practical use case — "it should be possible!" doesn't count as "practical" — please answer this comment.

comment:2 Changed 5 years ago by Baptiste Mispelon

Resolution: duplicate
Status: newclosed

comment:3 Changed 5 years ago by Anler Hp

Comment added.

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