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

java.net.http.HttpClient should reset the stream if response headers contain malformed header fields

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 21
    • None
    • core-libs
    • b14
    • Verified

    Description

      The current behavior is to close the connection with a protocol error.

      According to RFC 7540:

      Endpoints MUST treat a request or response that contains
      undefined or invalid pseudo-header fields as malformed (Section 8.1.2.6).

      Also:

      Just as in HTTP/1.x, header field names are strings of ASCII
      characters that are compared in a case-insensitive fashion. However,
      header field names MUST be converted to lowercase prior to their
      encoding in HTTP/2. A request or response containing uppercase
      header field names MUST be treated as malformed (Section 8.1.2.6).

      Section-8.1.2.6:
       Malformed requests or responses that are detected MUST be treated as a stream error (Section 5.4.2) of type PROTOCOL_ERROR.

      Attachments

        Issue Links

          Activity

            People

              dfuchs Daniel Fuchs
              dfuchs Daniel Fuchs
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: