Bug 60183 - missing reason phrase in tomcat 8.5.x
Summary: missing reason phrase in tomcat 8.5.x
Status: RESOLVED DUPLICATE of bug 60362
Alias: None
Product: Tomcat 8
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 8.5.x-trunk
Hardware: PC All
: P2 normal (vote)
Target Milestone: ----
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
: 60359 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-09-28 10:44 UTC by Arul
Modified: 2017-05-05 18:54 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arul 2016-09-28 10:44:44 UTC
In apache-tomcat-8.0.36

Request URL:http://localhost:8080/
Request Method:GET
Status Code:200 OK
Remote Address:[::1]:8080

In apache-tomcat-8.5.5

Request URL:http://localhost:8080/
Request Method:GET
Status Code:200 
Remote Address:[::1]:8080


From 8.5.x onwards we miss reason phrase(OK). we just get the status code (200) alone.
Comment 1 Mark Thomas 2016-09-28 10:55:37 UTC
As per the current HTTP/1.1 specification, the reason phrase is optional and Tomcat does not provide it.
Comment 2 Arul 2016-09-28 11:02:47 UTC
Reason Phrase was provided till 8.0.37. Not sure why this is intentionally removed from 8.5.x.
Comment 3 Huxing Zhang 2016-09-29 05:57:32 UTC
Hi, if you read the source codes,  the reason is stated clearly: 

https://github.com/apache/tomcat/blob/fc6f2ead8463d06ae73954508927e4f2224c8e77/java/org/apache/coyote/http11/Http11OutputBuffer.java#L341


// The reason phrase is optional but the space before it is not. Skip
// sending the reason phrase. Clients should ignore it (RFC 7230) and it
// just wastes bytes.
Comment 4 Ken DeLong 2016-10-14 15:04:46 UTC
Unfortunately, there is software out there - in my case embedded software that I cannot upgrade - that demands the reason phrase. Tomcat 8.5 is now forever broken for my application.  Omitting the phrase is fine - as you say, the spec does not require it - but please just add an option to turn it back on.  I don't want to be stuck on old versions of Tomcat for the next 3 years...
Comment 5 Coty Sutherland 2016-11-10 14:10:51 UTC
*** Bug 60359 has been marked as a duplicate of this bug. ***
Comment 6 Christopher Schultz 2016-11-10 15:08:15 UTC
(In reply to Ken DeLong from comment #4)
> Tomcat 8.5 is now forever broken for my application.

On the contrary; it sounds like your application is forever broken by the HTTP spec.

> Omitting the phrase is fine - as you
> say, the spec does not require it - but please just add an option to turn it
> back on.  I don't want to be stuck on old versions of Tomcat for the next 3
> years...

It sounds like a waste, but please file a new *enhancement* request here if you want an option to resurrect the reason phrase.
Comment 7 Todd Pierce 2016-11-11 03:36:09 UTC
Specs are specs, but the practicality is that some systems have non-upgradable legacy clients that require the reason phrase. For these systems, upgrading to Tomcat 5.5 (or Tomcat 8.0.36+) will break the app.

Tomcat used to support the reason phrase. Why can you not reintroduce the phrase as a config option?
Comment 8 Todd Pierce 2016-11-11 03:42:04 UTC
Apologies, re my previous comment. 8.5, not 5.5
Comment 9 Will Droste 2017-05-05 17:06:16 UTC
+1 for configuration option. 

Unfortunately there's clients that we have no control over but have large populations of devices that depend on that status code and are failing in the field. We've contacted the vendor to fix the issue (because we agree that phrases are optional based on the RFC) but they are slow to move on it and the ISP is also slow to send out any firmware to fix said devices. Plus from a customer perspective it looks like our software is broken rather than device even when we explain it to them, because it worked in a previous version.
Comment 10 Will Droste 2017-05-05 17:07:36 UTC
Sorry 'status code' -> 'status phrase'. I appreciate your time in the matter.
Comment 11 Will Droste 2017-05-05 17:08:59 UTC
Just one more comment.. There was a device in the field that exposed a BufferOverrun bug that crashed the application so we had to upgrade to the latest version where the bug was fixed.
Comment 12 Christopher Schultz 2017-05-05 18:21:58 UTC
This issue has been addressed for 8.5.x.
Comment 13 Christopher Schultz 2017-05-05 18:54:07 UTC

*** This bug has been marked as a duplicate of bug 60362 ***