Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8199494

Java control panel makes HTTP requests with User-Agent header without value

XMLWordPrintable

    • x86
    • windows_10

      FULL PRODUCT VERSION :
      java version "9.0.4"
      Java(TM) SE Runtime Environment (build 9.0.4+11)
      Java HotSpot(TM) 64-Bit Server VM (build 9.0.4+11, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [Version 10.0.15063]

      A DESCRIPTION OF THE PROBLEM :
      We have an application that is started through Java Web Start. After upgrade of Jetty to 9.4.8, we have started noticing HTTP header parsing exceptions in our logs on the server. It turns out that those requests are being sent by Java Control Panel whenever it starts. It sends a HTTP request like this:

      GET /jnlp/eclipseplugins.jsp HTTP/1.1
      User-Agent
      UA-Java-Version: 9.0.4
      Cache-Control: no-cache
      Pragma: no-cache
      User-Agent: Java/9.0.4
      Host: tas-cz-n24e.ca.com:8081
      Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
      Connection: keep-alive

      And here is the answer from Jetty, which actually points at the User-Agent header above:

      HTTP/1.1 400 Illegal character 0xA
      Content-Type: text/html;charset=iso-8859-1
      Content-Length: 64
      Connection: close

      <h1>Bad Message 400</h1><pre>reason: Illegal character 0xA</pre>

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Java not sending headers without value as per RFC 7230.

      REPRODUCIBILITY :
      This bug can be reproduced always.

            pardesha Pardeep Sharma
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: