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

Regression: empty "host: " header causes "400 Bad Request"

XMLWordPrintable

    • 3.1.5.1

      I have the docker daemon running behind an nginx proxy for access control. A recent update broke the setup, which was working before. tcpdump'ing a bit shows that docker-plugin sends an empty "host: " header.

      Nginx has not been updated, so this seems to be a change in docker-plugin (or Jenkins?).

      We send:

      GET /containers/json HTTP/1.1
      host:
      connection: keep-alive
      accept-encoding: gzip
      accept: application/json

      Nginx responds:

      HTTP/1.1 400 Bad Request
      Server: nginx/1.10.3
      Date: Fri, 12 Jan 2018 14:05:00 GMT
      Content-Type: text/html
      Content-Length: 173
      Connection: close

      <html>
      <head><title>400 Bad Request</title></head>
      <body bgcolor="white">
      <center><h1>400 Bad Request</h1></center>
      <hr><center>nginx/1.10.3</center>
      </body>
      </html>

      This matches what I get when I press the "Test Connection" button.

      Used versions:

      docker-java-api 3.0.14
      docker-plugin 1.1.2
      jenkinsĀ 2.101

            ericcitaire Eric Citaire
            jakob_tsd Jakob Unterwurzacher
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: