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

    • Bug
    • Status: Closed
    • P4
    • Resolution: Fixed
    • None
    • 18
    • core-libs
    • b05
    • Verified

    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

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

              Dates

                Created:
                Updated:
                Resolved: