libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libmicrohttpd] Change reason phrase


From: tiaan
Subject: Re: [libmicrohttpd] Change reason phrase
Date: Mon, 05 Dec 2022 23:24:23 -0500

Thank you, importantly you've answered my question that it is not possible.
May I complete the record then and respectfully disagree with your assessment of the merit. I quote from RFC7231:

6.1.  Overview of Status Codes

   The status codes listed below are defined in this specification,
   Section 4 of [RFC7232], Section 4 of [RFC7233], and Section 3 of
   [RFC7235].  The reason phrases listed here are only recommendations
   -- they can be replaced by local equivalents without affecting the
   protocol.

and from 7230:

The reason-phrase element exists for the sole purpose of providing a
   textual description associated with the numeric status code, mostly
   out of deference to earlier Internet application protocols that were
   more frequently used with interactive text clients.  A client SHOULD
   ignore the reason-phrase content.

     reason-phrase  = *( HTAB / SP / VCHAR / obs-text )

Regards

>Only by changing the source code and recompiling MHD. But you should not
>do this, this is a very bad idea. You should stick to the standard
>messages of the HTTP protocol. If you need to convey additional
>information, do it in the body or in a header; try to use HTTP status
>codes narrowly to what the HTTP standard says they are for.

>On 12/5/22 10:26, Tiaan via libmicrohttpd wrote:
>> Hi, is it possible to change the reason phrase of responses e.g. instead of
>> HTTP/1.1 401 Unauthorized rather HTTP/1.1 401 Account frozen?
>>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]