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

HttpClient doesn't handle H3_REQUEST_REJECTED correctly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 26
    • 26
    • core-libs
    • master

      HTTP/3 RFC specifies H3_REQUEST_REJECTED error as follows https://www.rfc-editor.org/rfc/rfc9114#H3_REQUEST_REJECTED:

      > H3_REQUEST_REJECTED (0x010b):
      >
      > A server rejected a request without performing any application processing.

      Section 4.1.1 states https://www.rfc-editor.org/rfc/rfc9114#section-4.1.1 :When the server cancels a request without performing any application processing, the request is considered "rejected". The server SHOULD abort its response stream with the error code H3_REQUEST_REJECTED. In this context, "processed" means that some data from the stream was passed to some higher layer of software that might have taken some action as a result. The client can treat requests rejected by the server as though they had never been sent at all, thereby allowing them to be retried later.

      Right now, the HttpClient implementation treats this error code as just another error and fails the request.

      The HttpClient implementation should instead treat this as an error which will allow for the request to be retried afresh. A similar implementation currently exists for HTTP/2 requests which receive a REFUSED_STREAM error.

            jpai Jaikiran Pai
            jpai Jaikiran Pai
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: