Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-8154

No "Reason Phrase" Sent with HTTP Responses

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Information Provided
    • Affects Version/s: 3.3.4
    • Fix Version/s: None
    • Component/s: JAX-RS
    • Labels:
      None
    • Environment:

      Apache Tomcat 8.5, OpenJDK 1.8

    • Estimated Complexity:
      Unknown

      Description

      When I throw, for example, a javax.ws.rs.NotFoundException, my expectation is that the response would start with a Status Line like:

      HTTP/1.1 404 Not Found
      

      However, I just get a response like:

      HTTP/1.1 404
      

      This seems to be true both if I provide a message when I construct the exception, or if I use the no argument constructor.

      This is similarly true for any exceptions triggered internally by CXF, for example if I make a request with an unsupported method. The stack trace in my logs shows a javax.ws.rs.ClientErrorException: HTTP 406 Not Acceptable, but the response just shows HTTP/1.1 406.

      My expectation is that either the appropriate default "reason phrase", or the message I provided to my constructed exception, would be returned to the caller?

      My reading of RFC 2616 is that such a reason phrase is not optional: https://tools.ietf.org/html/rfc2616#section-6.1

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              pioto Mike Kelly
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: