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

Content is returned for HEAD requests when using gzip

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Blocker Blocker
    • core
    • Jenkins 1.458 and later. Reproduced on 1.466.1 and 1.481. The Jenkins instance is behind Apache using mod_proxy.

      The Jenkins connector for Mylyn issues a HEAD / request followed by a GET /api/xml request. When an "Accept-Encoding: gzip" header is included in the requests, Jenkins sends unexpected content as part of the response to the HEAD request which breaks the HTTP connection.

      This can be reproduced by running the Jenkins 1.481 and curl:

      $ curl -v --keepalive -H "Accept-Encoding: gzip,deflate" --head http://localhost:8080/? http://localhost:8080/?

      > HEAD /? HTTP/1.1
      ...
      < HTTP/1.1 200 OK
      < Set-Cookie: JSESSIONID.e8d41638=6c7970ab0aa9ccf39d999cdbe95f53d4; Path=/; <

      • Connection #0 to host localhost left intact
      • Connection #0 seems to be dead!
      • Closing connection #0
      • About to connect() to localhost port 8080 (#0)
      • Trying 127.0.0.1... connected
        > HEAD /? HTTP/1.1

      Instead of keeping the connection alive curl closes it because the response wasn't valid.

      This problem breaks the Jenkins connector for Mylyn: https://bugs.eclipse.org/bugs/show_bug.cgi?id=376468

            mc1arke Michael Clarke
            spingel2 Steffen Pingel
            Votes:
            3 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: