sun.net.www.URLConnection does not implement getHeaderFields()

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P3
    • tbd
    • Affects Version/s: 14
    • Component/s: core-libs
    • None
    • generic
    • generic

      The base class used for a number of the URL connection classes does not implement the getHeaderFields() method resulting in an empty map always being returned. This results in inconsistent behaviour with getHeaderField("some-header") returning non-null results for valid headers such as "content-length" at the same time as the getHeaderFields() method is reporting that there no headers associated with the URL.

      A straightforward implementation that copies headers from the MessageHeader properties object in to a new TreeMap(String.CASE_INSENSITIVE_ORDER) is possible.

            Assignee:
            Michael McMahon
            Reporter:
            Mike Duigou
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: