Uploaded image for project: 'HttpComponents HttpCore'
  1. HttpComponents HttpCore
  2. HTTPCORE-516

Reason phrase in HttpStatus constants are not needed due to changes in RFC 7230

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Not A Problem
    • None
    • None
    • HttpCore
    • None

    Description

      Introduction

      After updating one (Serivce-A) of our Web services to Tomcat 8.5 we realised that HTTP Status header changed according to RFC 7230 

      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. "

      Some temporary workaround exists (set deprecated option sendReasonPhrase to true), but it will be impossible in tomcat 9.

      Problem

      Ok, what about HttpCore?

      Another our service (Service-B) use HttpStatus lib and its constants like SC_OK to assert response from Service-A. And after updating to tomcat 8.5 it became to fail assertion every time. Why? Now SC_OK = "200 OK", but according to RFC 7230 must be just "200". The same issue with another status constans.

      I`m not expert in you library, but smth must be done to support new standard from one hand and to support legacy http servers from another.

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            chmelvv Viktor Chmel
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: