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

env-vars.html doesn't set content-type, this doesn't work on tomcat with apache proxy

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • core
    • None
    • linux, apache 2.2, mod_proxy, tomcat 6.0.35

      env-vars.html doesn't set the content-type header, this works if the tomcat or servlet server is accessed directly since the browser will default to text/html, but when running behind apache mod_proxy, the proxy will add a default text/plain header, which breaks the html display

          [JENKINS-14886] env-vars.html doesn't set content-type, this doesn't work on tomcat with apache proxy

          evernat added a comment -

          I do not reproduce the issue using Jenkins 1.528. I have a content type for "http://<host>/env-vars.html/?"
          Do you reproduce the issue or can we close this?

          evernat added a comment - I do not reproduce the issue using Jenkins 1.528. I have a content type for "http://<host>/env-vars.html/?" Do you reproduce the issue or can we close this?

          Alex Lehmann added a comment - - edited

          I still get no content-type when running in tomcat 7, but it looks this has no longer an bad effect, even with mod_proxy

          >curl -i http://localhost/jenkins/env-vars.html/
          HTTP/1.1 200 OK
          Date: Sat, 24 Aug 2013 19:33:56 GMT
          Server: Apache-Coyote/1.1
          Content-Length: 2059
          

          the header is added in Winstone, however.

          can you close the issue if you like.

          Alex Lehmann added a comment - - edited I still get no content-type when running in tomcat 7, but it looks this has no longer an bad effect, even with mod_proxy >curl -i http: //localhost/jenkins/env-vars.html/ HTTP/1.1 200 OK Date: Sat, 24 Aug 2013 19:33:56 GMT Server: Apache-Coyote/1.1 Content-Length: 2059 the header is added in Winstone, however. can you close the issue if you like.

          evernat added a comment -

          This may be closed but I am a bit curious.
          Do you have a content type using Tomcat for the following, without "/?" at the end?
          curl -i http://localhost/jenkins/env-vars.html

          evernat added a comment - This may be closed but I am a bit curious. Do you have a content type using Tomcat for the following, without "/?" at the end? curl -i http://localhost/jenkins/env-vars.html

          Alex Lehmann added a comment - - edited

          when accessing the url without / or /? at the end I get a redirect to the url with /

          when accessing httpd, it has a content-type, on tomcat it doesn't:

          >curl -i http://localhost/jenkins/env-vars.html
          HTTP/1.1 302 Found
          Date: Sun, 25 Aug 2013 11:51:26 GMT
          Server: Apache-Coyote/1.1
          Location: http://localhost/jenkins/env-vars.html/
          Content-Length: 0
          Content-Type: text/html
          
          >curl -i http://localhost:8080/jenkins/env-vars.html
          HTTP/1.1 302 Found
          Server: Apache-Coyote/1.1
          Location: http://localhost:8080/jenkins/env-vars.html/
          Content-Length: 0
          Date: Sun, 25 Aug 2013 11:52:11 GMT
          

          (I wonder why this is sending a redirect at all)

          Alex Lehmann added a comment - - edited when accessing the url without / or /? at the end I get a redirect to the url with / when accessing httpd, it has a content-type, on tomcat it doesn't: >curl -i http: //localhost/jenkins/env-vars.html HTTP/1.1 302 Found Date: Sun, 25 Aug 2013 11:51:26 GMT Server: Apache-Coyote/1.1 Location: http: //localhost/jenkins/env-vars.html/ Content-Length: 0 Content-Type: text/html >curl -i http: //localhost:8080/jenkins/env-vars.html HTTP/1.1 302 Found Server: Apache-Coyote/1.1 Location: http: //localhost:8080/jenkins/env-vars.html/ Content-Length: 0 Date: Sun, 25 Aug 2013 11:52:11 GMT (I wonder why this is sending a redirect at all)

          Daniel Beck added a comment -

          Still happening on 1.561

          Daniel Beck added a comment - Still happening on 1.561

          Daniel Beck added a comment -

          Fixed in 1.571+ as JENKINS-21716.

          Daniel Beck added a comment - Fixed in 1.571+ as JENKINS-21716 .

            Unassigned Unassigned
            alexlehm Alex Lehmann
            Votes:
            3 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: