Hi Bowen,
On Mon, Aug 03, 2015 at 02:30:52PM -0700, Bowen Ni wrote:
> Hi,
>
> Yes the purpose is only to write the correct reason for a given status code.
>
> In some systems there are custom status code that are unknown. That is
> when setting reasons can be useful.
Then I'd rather have the set-code (better call it status BTW to be
consistent with other places) automatically apply the correct reason
for known status codes and fall back to the code class' reason when
the code isn't known (reasons associated with 100, 200, 300, 400, 500).
Otherwise you can be sure that most people won't set the reason and
you'll end up with status codes not matching the reason, which is the
opposite of the goal you seem to be seeking.
Regards,
Willy
On Mon, Aug 03, 2015 at 02:30:52PM -0700, Bowen Ni wrote:
> Hi,
>
> Yes the purpose is only to write the correct reason for a given status code.
>
> In some systems there are custom status code that are unknown. That is
> when setting reasons can be useful.
Then I'd rather have the set-code (better call it status BTW to be
consistent with other places) automatically apply the correct reason
for known status codes and fall back to the code class' reason when
the code isn't known (reasons associated with 100, 200, 300, 400, 500).
Otherwise you can be sure that most people won't set the reason and
you'll end up with status codes not matching the reason, which is the
opposite of the goal you seem to be seeking.
Regards,
Willy