[PATCH] [nginx-quic] fix error code when reached maximum number of requests or timeout

Sergey Kandaurov pluknet at nginx.com
Thu May 27 12:58:55 UTC 2021

> On 27 May 2021, at 15:16, Andrey Kolyshkin <i at morfi.ru> wrote:
> # HG changeset patch
> # User Andrey Kolyshkin <i at morfi.ru>
> # Date 1622115662 -10800
> #      Thu May 27 14:41:02 2021 +0300
> # Branch quic
> # Node ID cfb1ac5fa0f6e2b86d4e4ce51e9ce0b33f959d66
> # Parent  e6c26cb4d38b8cecb89f26e002bfacf11eafe4a1
> fix error code when reached maximum number of requests or timeout
> chrome has marked quic connection as broken after
> getting NGX_HTTP_V3_ERR_NO_ERROR (0x100) as code instead of NGX_QUIC_ERR_NO_ERROR (0x0)
> --> close_type = "Application"
> --> details = "reached maximum number of requests"
> --> quic_error = 122 (QUIC_IETF_GQUIC_ERROR_MISSING)
> --> quic_wire_error = 256

It looks like a bug in Chrome.
Per quic-http draft 34, 5.2. Connection Shutdown:

   Once all accepted requests and pushes have been processed, the
   endpoint can permit the connection to become idle, or MAY initiate an
   immediate closure of the connection.  An endpoint that completes a
   graceful shutdown SHOULD use the H3_NO_ERROR error code when closing
   the connection.

The graceful shutdown is what happens with nginx.

Also, 8.1. HTTP/3 Error Codes:

   The following error codes are defined for use when abruptly
   terminating streams, aborting reading of streams, or immediately
   closing *HTTP/3 connections*.

   H3_NO_ERROR (0x100):  No error.  This is used when the connection or
      stream needs to be closed, but there is no error to signal.

So, it should be perfectly fine to send CC(0x1d)/H3_NO_ERROR.

Sergey Kandaurov

More information about the nginx-devel mailing list