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

com/sun/net/httpserver/Headers.java: Ensure mutators normalize keys and disallow null for keys and values

XMLWordPrintable

    • b05
    • Verified

      The Headers class normalizes its keys to adhere to the following format: First character uppercase, all other characters lowercase, for example "foo" -> "Foo". This behaviour is not consistent across the mutator methods of the class, in particular putAll() and replaceAll() do not apply normalization.

      Suggested fix:
      - change the implementation of putAll()
      - add adequate override of the java.util.Map default method replaceAll()

      Additionally, update Headers to disallow null values for keys and values.

            jboes Julia Boes (Inactive)
            jboes Julia Boes (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: