Re: [libmicrohttpd] Change reason phrase

2022-12-05 Thread Evgeny Grin
From the new RFC 9112. https://www.rfc-editor.org/rfc/rfc9112.html#section-4 -- A client SHOULD ignore the reason-phrase content because it is not a reliable channel for information (it might be translated for a given locale, overwritten by int

Re: [libmicrohttpd] Change reason phrase

2022-12-05 Thread Christian Grothoff
Well, the RFC says that the client SHOULD ignore it. Yes, the server MAY change it, but to rely on it doesn't create a robust protocol: For example, by my reading, HTTP (reverse) proxies between client and server MAY change the message... So yes, having the 'wrong' message technically doesn't

Re: [libmicrohttpd] Change reason phrase

2022-12-05 Thread Tiaan via libmicrohttpd
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 lis

Re: [libmicrohttpd] Change reason phrase

2022-12-05 Thread Christian Grothoff
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 wha

[libmicrohttpd] Change reason phrase

2022-12-05 Thread Tiaan via libmicrohttpd
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?