Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#20328 closed Cleanup/optimization (duplicate)

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

Reported by: ikame 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 ikame 2 years ago.

Download all attachments as: .zip

Change History (4)

Changed 2 years ago by ikame

comment:1 Changed 2 years ago by aaugustin

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

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 2 years ago by bmispelon

  • Resolution set to duplicate
  • Status changed from new to closed

comment:3 Changed 2 years ago by ikame

Comment added.

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