Re: Could someone clarify these sentences in HPACK RFC 7541?

Hi Martin,

Thanks for your detailed description! I know the sequence of the behaviors
now.
I have two questions:

1. Some defined settings, like SETTINGS_INITIAL_WINDOW_SIZE and
SETTINGS_MAX_CONCURRENT_STREAMS, take effect immediately after the receiver
sends ACK, as the sentences described in RFC 7540:

"When the value of SETTINGS_INITIAL_WINDOW_SIZE changes, a receiver MUST
adjust the size of all stream flow-control windows that it maintains by the
difference between the new value and the old value."
"An endpoint that wishes to reduce the value of
SETTINGS_MAX_CONCURRENT_STREAMS to a value that is below the current number
of open streams can either close streams that exceed the new value or allow
streams to complete."

I thought the SETTINGS_HEADER_TABLE_SIZE setting follows the same design,
that is, the receiver of this defined setting changes the dynamic table
immediately after it receives this defined setting if the value is smaller
than previous one. So why does it need to send additional Dynamic Table
Size Update?

2. Current RFC seems to lack a description on a change to
SETTINGS_MAX_FRAME_SIZE, especially a reduction on frame size. Should it be
added to keep it consistent with descriptions of changes to other defined
settings?

On Mon, Jan 17, 2022 at 7:14 PM Martin Thomson <mt@lowentropy.net> wrote:

> You might find the updated text in our revision of HTTP/2 helpful here:
>
>
> https://httpwg.org/http2-spec/initial-table-size/draft-ietf-httpbis-http2bis.html#name-compression-state
>
> The maximum size of the dynamic table is declared by an endpoint using
> SETTINGS_HEADER_TABLE_SIZE.  This sets a maximum size their decoder is
> willing to handle.
>
> An encoder uses a Dynamic Table Size Update to declare the size of the
> dynamic table.  The endpoint that receives the SETTINGS_HEADER_TABLE_SIZE
> setting must tell their encoder not to exceed this number.
>
> Both the maximum size (that is, SETTINGS_HEADER_TABLE_SIZE) and the
> current size of the dynamic table start at 4096 (4k) bytes.
>
> When an endpoint processes the SETTINGS_HEADER_TABLE_SIZE setting, they
> then acknowledge the setting (SETTINGS with ACK flag set).  After that, the
> maximum applies.  If the size of the dynamic table at the encoder is larger
> than the maximum when this happens, the encoder MUST start the next header
> block (or field block in new terms) with a Dynamic Table Size Update
> instruction with a value less than or equal to the setting.
>
>
> On Mon, Jan 17, 2022, at 14:40, Jingcheng Zhang wrote:
> > When reading HPACK RFC 7541, I am confused on these sentences, in
> section 4.2:
> >
> > "This dynamic table size update MUST occur at the beginning of the
> > first header block following the change to the dynamic table size. In
> > HTTP/2, this follows a settings acknowledgment (see Section 6.5.3
> > <https://tools.ietf.org/html/rfc7540#section-6.5.3> of [HTTP2]
> > <https://httpwg.org/specs/rfc7541.html#HTTP2>)."
> >
> > I'm not a English native speaker, and I have difficulty in
> > understanding these two sentences. Could someone kindly elaborate the
> > detailed sequences on this, like what happens first, what happens
> > later, making it more clear to understand?
> >
> > Thank you in advance!
> >
> > --
> > Best regards,
> > Jingcheng Zhang
> > Beijing, P.R.China
>
>

-- 
Best regards,
Jingcheng Zhang
Beijing, P.R.China

Received on Tuesday, 18 January 2022 03:42:31 UTC