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

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 18
    • Component/s: core-libs
    • Subcomponent:
    • Resolved In Build:
      b05

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jboes Julia Boes
              Reporter:
              jboes Julia Boes
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: