Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-15173

Exceptional HEAD requests return a non-zero Content-Length header

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 14.0.18.Final, 15.0.0.Dev04
    • 15.0.0.Dev02, 14.0.17.Final
    • REST
    • None

    Description

      When an exception is encountered on REST requests, the RestRequestHandler sets the appropriate response code and sets the response entity according to the exception type. The RequestWriter then sets the Content-Length header equal to the length of the set entity. However, in the case of HEAD requests no content should be returned. Netty realises that the server is responding to a HEAD request and automatically excludes the body of the response, however the Content-Length is still set to be non-zero. Consequently, client implementations may attempt to read Content-Length bytes even though no content exists in the response body.

      In the case of the Operator this is resulting in the http client failing with an EOF error when parsing the response.

      Attachments

        Activity

          People

            remerson@redhat.com Ryan Emerson
            remerson@redhat.com Ryan Emerson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: