Chris,
-----Original Message-----
From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
Sent: 23 November 2016 04:37
To: Tomcat Users List <users@tomcat.apache.org>
Subject: Re: HTTP response status line doesn't have reason phrase.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Chandra,

On 11/21/16 11:06 PM, Chandrashekar H.S wrote:
> Hi All,
> 
> We have a multiple tomcat servers which are monitored by F5 health 
> manager, all tomcat web servers contain a httpstatuscheck web service.
> 
> The F5 does the heath ping and waits for “200 OK”  in response for 
> monitoring tomcat servers.
> 
> As per tomcat 8.5 changelog, the reason phrase is removed by default 
> as it is optional. So  I tried to set the reason phrase in response 
> programmatically inside httpstatuscheck web service, then also its not 
> appearing in HTTP response.
> 
> * Fix:  RFC 7230 states that clients should ignore reason phrases in 
> HTTP/1.1 response messages. Since the reason phrase is optional, 
> Tomcat no longer sends it. As a result the system property 
> org.apache.coyote.USE_CUSTOM_STATUS_MSG_IN_HEADER is no longer used 
> and has been removed. (markt)
> 
> This means if I set a custom reason phrase, it will not appear in the 
> http response status line?

How are you trying to send a reason phrase from your web service?

I would expect Tomcat to not provide any of its own reason phrases, but not 
remove any reason phrase provided by an application.

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJYNM96AAoJEBzwKT+lPKRYRJYP/Rk0xwzhfNeIjWjxG7w3qAa4
IDb97ITZpjf2efJ+miPlCnfdxZV6eFF5ynwn88417sre58gafGTK2FFkdFBLYiBa
WqrIFP5dCUYpz2V3psk9mGK5h6j+RTVDv3hw4M4139Vhc/3F+lf7Ccv11pgbFoVC
wQ8cYoeiBDoHTlqNKAKFzACCitkli1V3GyFgNd2QgzWp9SRJwb439Qr2rE4KXcek
SWfAGNg788we2llfj9hQjCiooPVtSAuCEdYzM3JO4B4UYb6XO0hFU+oDLNwaHPgn
7I5DP3PGYzGektP+Mlm1YRyVG18X82sXur+TVqT42mVphtcktOb3ioBot7ycPkSI
Yw1PWHYeGFD5nEQWur8PTdUEKdcZMKSqEirbCiyuTbr1870CdpNjmqTbEC8uQbjl
6nnGf87RvJEVctgZq0pPf3h1Xl01ikUpi+eJDlHTb2NKWEHEhDvOBv5YOhsoMa2Y
IUczbG47W49hqCVe709rsMqMJR3UlDnLUk04phm62/UqGbzgOc3FvZN2OBeM/B1M
R8Tf+5fhm6/uxPeyS8knG6clw4coWJNGohs5tturDgDuqQC0uAPEPCQxYXUqjeLF
cZVhg8f78F3qrzYX37W3wP0CQ/j7ohwxMWGnMxb1jkeovungn7IwMWQG8v4OArZX
5j/eQhqf5TuvKLxSOCEz
=MBxI
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

This is how my doGet method look. 
/**
     * This method handles all the GET requests
     */
    protected void doGet(HttpServletRequest request, HttpServletResponse 
response)
            throws ServletException, IOException {
             String methodName = "doGet()";
             //response.setStatus(HttpServletResponse.SC_OK, "OK");
             response.sendError(HttpServletResponse.SC_OK, "OK");
             //response.setStatus(HttpServletResponse.SC_OK);
             knLogger.debug(methodName + "Health check : Response ");
    }

Regards
Chandra,

Reply via email to