https://bz.apache.org/bugzilla/show_bug.cgi?id=63867

--- Comment #5 from Christopher Schultz <ch...@christopherschultz.net> ---
(In reply to Michael Osipov from comment #4)
> (In reply to Mark Thomas from comment #3)
> > I think I would be a good thing (long term) for a number of companies to be
> > forced to go through a multi-million dollar hardware fix / replacement
> > program so that the next time a system like this is designed more thought it
> > is given to the question "What happens when (not if) the client needs to be
> > updated?".
> 
> +1

So, I *completely* agree with this statement and it's sentiment, but, honestly,
this response is pretty hostile to the Tomcat community. If anyone wants to
know the answer to the question "why do people use Jetty instead of Tomcat?"
then this kind of the response is going to be a part of the answer.

I honestly don't understand why this issue is so contentious. HTTP/2 does not
have reason phrases at all, and they are practically optional in HTTP/1.1
because there are no requirements for their content
(https://tools.ietf.org/html/rfc7231#section-6.1).

There is an interesting conversation about the reason phrase NOT being
resurrected in HTTP/2 here: https://github.com/http2/http2-spec/issues/202. I
find mnot's comment from 2018-02-04 to be the most compelling support for
dropping the reason phrase.

But when it comes down to it, inclusion of reason phrases are NOT prohibited by
any version of HTTP/1.1 and some applications -- regardless of how foolish it
is to have done so -- are evidently dependent upon their presence.

The servlet spec has both HttpServletResponse.setStatus(int,String) which has
been deprecated since spec 2.1 (release in 1998, so over 20 years ago) and
HttpServletResponse.sendError(int,String). The former method argues that the
usage of the "msg" parameter is ambiguous and suggests that #sendError should
be user instead, but then the docs for #sendError imply that the "msg"
parameter is used as the response *entity* and not as a reason phrase. So, IMO,
there is still plenty of ambiguity there.

If sendError(int,String) does set a reason phrase, then NOT respecting the
application's attempts to set the reason phrase seems like a bug to me --
excepting of course the case where h2 is the protocol, but again, that is the
application's choice.

If Tomcat wants to omit reason phrases BY DEFAULT then I think that is
reasonable. But if an application calls response.setStatus(200, "Super Duper")
-- or response.sendError(200, "Super Duper") then I think it's reasonable to
expect that the response on the wire will actually include that text.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to