Uploaded image for project: 'Undertow'
  1. Undertow
  2. UNDERTOW-1210

mod_cluster NodePingUtil ping request is not valid

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 2.0.0.Beta1, 1.4.21.Final
    • 1.4.20.Final
    • Proxy
    • None

    Description

      The static ClientRequest PING_REQUEST, defined in NodePingUtil.java, is not valid.

      RFC 2616 (Hypertext Transfer Protocol – HTTP/1.1) dictates that a client that sends an HTTP/1.1 request MUST send a Host header. If the Host header is not sent, the server response MUST be a 400 (Bad Request) error message.
      And exactly that happens (tested with JBoss EAP 6.4 backend):

      HTTP/1.1 400 Bad Request
      Server: Apache-Coyote/1.1
      Transfer-Encoding: chunked
      Date: Wed, 25 Oct 2017 07:44:19 GMT
      Connection: close

      There are two ways to solve this, either change the protocol to HTTP/1.0 or set the Host header (to localhost).

      Apache httpd mod_cluster uses the HTTP/1.0 protocol for a ping request.
      I would prefer to explicitly set the protocol to HTTP/1.1 and set the Host header because it will keep the connection alive.

      Please let me know which option is most prefered.

      References:
      https://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html#sec5.2
      https://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.6.1.1

      Attachments

        Activity

          People

            sdouglas1@redhat.com Stuart Douglas
            frapex Frank de Jong (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: