Jetty
  1. Jetty
  2. JETTY-1084

HEAD command not setting content-type in response under certain circumstances

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 6.1.18
    • Fix Version/s: 7.0.0, 6.1.21
    • Component/s: None
    • Labels:
      None
    • Environment:
      Running jetty-6.1.18 on CentOS 5.3 built with java 1.6u3
    • Number of attachments :
      5

      Description

      my UI developers have a jnlp file that downloads jars to run on the client. in Jetty 6.1.9 this worked for java 1.5 clients, but in 6.1.18, it does not work as expected. with java 1.5 clients, it complains that the Content-Type is null, and, it is:

      This is what the client sends to the server:

      mattrose@coltrane:~$ telnet 192.168.70.156 80
      Trying 192.168.70.156...
      Connected to 192.168.70.156.
      Escape character is '^]'.
      HEAD /webstart/N-central/jrcc-1.5.jar?version-id=7.0.0.888 HTTP/1.1
      pragma: no-cache
      accept-encoding: pack200-gzip,gzip
      Content-Type: application/x-java-archive; charset=utf-8
      User-Agent: JNLP/1.5 javaws/1.5.0_20 (b02) J2SE/1.5.0_20
      UA-Java-Version: 1.5.0_20
      Host: 192.168.101.108
      Accept: text/html, image/gif, image/jpeg, ; q=.2, */; q=.2
      Connection: keep-alive

      and this is the response from the server:

      HTTP/1.1 200 OK
      Content-Type: text/html; charset=iso-8859-1
      Content-Length: 1403
      x-java-jnlp-version-id: 7.0.0.888
      Server: Jetty(6.1.9)

      But if I send the same thing to a 6.1.18 server, I get this in response:

      HTTP/1.1 200 OK
      x-java-jnlp-version-id: 7.0.0.892
      Content-Length: 0
      Server: Jetty(6.1.18)

      I tried to figure out why the difference exists, so that I could patch it myself, but I couldn't figure out why the Content-Type: header wasn't getting set in this one circumstance.

      1. Notepad.jnlp
        2 kB
        Matt Rose
      2. testcase.tar.gz
        88 kB
        Matt Rose
      3. web.xml
        9 kB
        Matt Rose

        Issue Links

          Activity

            People

            • Assignee:
              Jan Bartel
              Reporter:
              Matt Rose
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: