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

incorrect set property "cookie" in HttpURLConnection.setRequestProperty()

XMLWordPrintable

    • sparc
    • solaris_2.5


      Below there is the source of the sun.net.www.protocol.http.HttpURLConnection.setRequestProperty() method:

          public void setRequestProperty(String key, String value) {
              if (connected)
                  throw new IllegalAccessError("Already connected");
      /* There should be only one header per key, but special-case
      * HTTP cookies.
      */
      if ("set-cookie".equalsIgnoreCase(key)) {
      requests.add(key, value);
      } else {
      requests.set(key, value);
      }
          }

      But the field in the request to server is called "cookie".
      [Victor Lapitsky, SPb HotJava Team, ###@###.###

            mmcclosksunw Michael Mccloskey (Inactive)
            spikalev Sergei Pikalev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: