• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • other
    • None

      Grab the war (just verified again with 1.460) and run with 'java -jar jenkins.war'. Then send a HEAD request and observe that the server returns a body (this is best done by using 'telnet localhost 8080' and sending 'HEAD / HTTP/1.0' - tools like curl and lwp-request will suppress any received body).

      This specifically causes issues with the Eclipse Mylyn plugin as that sends a HEAD request followed by a GET - because the connection is kept alive between the two requests, the parsing of the second response fails since it tries to parse the body from the HEAD as the http response headers of the GET.

      Note that running Jenkins in Tomcat does not have this issue.

          [JENKINS-13480] Http HEAD request returns body

          this seems to affect also 1.461

          Lorenzo Bettini added a comment - this seems to affect also 1.461

          evernat added a comment -

          Since Jenkins v1.535, when running with "java -jar jenkins.war", the Winstone servlet container was replaced by Jetty 8.
          It seems to me that the Jetty change fixes this issue.
          Can you confirm?

          evernat added a comment - Since Jenkins v1.535, when running with "java -jar jenkins.war", the Winstone servlet container was replaced by Jetty 8. It seems to me that the Jetty change fixes this issue. Can you confirm?

          Mike Bartsch added a comment - - edited

          The issue still exists for version 1.542, we run jenkins as application in jetty (8.1.14.v20131031) on a solaris environment (SunOS 5.10 Generic_147440-12 sun4v sparc SUNW,T5440 Solaris) with jdk1.6.0_43.

          We use jenkins built-in user database and per-project matrix authentication.

          The context/jenkins.xml looks like:

          <Configure class="org.eclipse.jetty.webapp.WebAppContext">
          <Set name="contextPath">/jenkins/trunk</Set>
          <Set name="war"><SystemProperty name="jetty.home" default="."/>/webapps/jenkins.war</Set>
          <Get name="securityHandler">
          <Set name="loginService">
          <New class="org.eclipse.jetty.security.HashLoginService">
          <Set name="name">Jenkins Realm</Set>
          <Set name="config"><SystemProperty name="jetty.home" default="."/>/etc/realm.properties</Set>
          </New>
          </Set>
          </Get>
          </Configure>

          Mike Bartsch added a comment - - edited The issue still exists for version 1.542, we run jenkins as application in jetty (8.1.14.v20131031) on a solaris environment (SunOS 5.10 Generic_147440-12 sun4v sparc SUNW,T5440 Solaris) with jdk1.6.0_43. We use jenkins built-in user database and per-project matrix authentication. The context/jenkins.xml looks like: <Configure class="org.eclipse.jetty.webapp.WebAppContext"> <Set name="contextPath">/jenkins/trunk</Set> <Set name="war"><SystemProperty name="jetty.home" default="."/>/webapps/jenkins.war</Set> <Get name="securityHandler"> <Set name="loginService"> <New class="org.eclipse.jetty.security.HashLoginService"> <Set name="name">Jenkins Realm</Set> <Set name="config"><SystemProperty name="jetty.home" default="."/>/etc/realm.properties</Set> </New> </Set> </Get> </Configure>

          I've just installed Jenkins 1.549, and I can now connect to it with the Eclipse Mylyn plugin.

          I also tried this

          HEAD / HTTP/1.0

          and I don't see any 'body'

          Lorenzo Bettini added a comment - I've just installed Jenkins 1.549, and I can now connect to it with the Eclipse Mylyn plugin. I also tried this HEAD / HTTP/1.0 and I don't see any 'body'

          Oleg Nenashev added a comment -

          The issue seems to be resolved

          Oleg Nenashev added a comment - The issue seems to be resolved

            Unassigned Unassigned
            qwazctl a b
            Votes:
            4 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: