Reason phrase is deprecated and is not set in JWS 5 Tomcat 9 onwards
Issue
- We no longer see a reason phrase included in responses from Tomcat in JWS 5.0+. This causes some issues with particular client applications or load balancer health checks.
JWS 5 Tomcat:
$ curl -I http://127.0.0.1:8080
HTTP/1.1 200 # WITHOUT REASON-PHRASE
Content-Type: text/html;charset=UTF-8
Transfer-Encoding: chunked
Date: Tue, 28 Aug 2018 05:22:35 GMT
JWS 3.1 Tomcat:
$ curl -I http://127.0.0.1:8080
HTTP/1.1 200 OK # WITH REASON-PHRASE
Content-Type: text/html;charset=ISO-8859-1
Transfer-Encoding: chunked
Date: Tue, 28 Aug 2018 05:23:16 GMT
Server: My-Alternate-Server-Name
- As per the documentation for the community version of Tomcat 8.5 http-connector and ajp-connector, there's
sendReasonPhraseattribute in the connector option that can controll to send a reason phrase. It also saysNote: This option is deprecated and will be removed in Tomcat 9. The reason phrase will not be sent.However, is there any similar configurable option in Tomcat 9?
Environment
- Red Hat JBoss Web Server
- 5.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.