Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-40693

badMessage: 400 Bad Host header for HttpChannelOverHttp

    Details

    • Similar Issues:

      Description

      Behind a reverse proxy a requests may fail with this error

      WARNING	o.e.jetty.util.log.JavaUtilLog#warn: badMessage: 400 Bad Host header for HttpChannelOverHttp@123456{r=0,c=false,a=IDLE,uri=/foo/bar/}
      

      In Jenkins 2.0 Jetty was upgraded from 8.1 to 9.2 which removes AJP functionality, and also requires that if the HOST: field is used it can not be empty.

      KO:

      GET /foo/bar HTTP/1.1\r\nHOST: \r\nConnection: Close\r\n\r\n
      

      OK:

      GET /foo/bar HTTP/1.1\r\nHOST:null \r\nConnection: Close\r\n\r\n
      

      Current winstone version includes Jetty server 9.2.15.v20160210.

      The fix is in 9.3.... See:
      https://github.com/eclipse/jetty.project/issues/592. https://github.com/eclipse/jetty.project/commit/7e16731b9dac0d5b6ae5424a13c83fd4ef46dc4f

      The Jetty version embedded in winstone must be upgraded to have a fix
      The workaround is to take care to never send an empty HOST

        Attachments

          Activity

            People

            • Assignee:
              aheritier Arnaud Héritier
              Reporter:
              aheritier Arnaud Héritier
            • Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: