Code

Opened 15 months ago

Closed 15 months ago

Last modified 15 months 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

Description

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 15 months ago.

Download all attachments as: .zip

Change History (4)

Changed 15 months ago by ikame

comment:1 Changed 15 months 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 15 months ago by bmispelon

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

comment:3 Changed 15 months ago by ikame

Comment added.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.