Re: H2 vs HPACK header table size... again

On Thu, Dec 23, 2021 at 09:24:32AM +1100, Martin Thomson wrote:
> Hi Willy,
> 
> My interpretation has always been that if the value has *changed* the encoder
> sends a size update.  The value changes at an encoder when that endpoint
> sends a SETTINGS ACK for a SETTINGS that had a different value to the
> existing value.

It can be an interpretation but at the stage you deal with settings
there's no HPACK yet.

> The value starts at the initial 4k value.

My interpretation was that HPACK's initial value starts at the SETTINGS
value.

> Obviously, this is a bit silly in a few cases, but the cost is marginal.

I totally agree and am even willing to systematically emit that byte,
as I said I just want to be certain that I'm not papering over random
stuff. And if I have to do this while I don't read this from the spec,
I think it warrants a minor text update in the spec. Alternately we
may update the new H2 spec (since it's not released yet) to mention
that the SETTINGS parameter doesn't change the HPACK's initial value
but corresponds to an update and will require a size update. It can
be confusing not to find it in the HPACK spec but could be easier to
find than by checking for errata.

> * If the decoder opens with a >4k value in its preface and the encoder wants
> to keep the 4k initial value, then the encoder has to send a size change
> instruction.

I'm fine with this one.

> * A server rarely has a situation where the initial value is needed as it
> always has the value from the client preface, but it has to send the SETTINGS
> ACK and size change instruction anyway, unless the client retains the 4k
> initial value.

That's the delicate point in my opinion, where not sending anything means
something different for the client.

> Tatsuhiro's interpretation here matches my own, I think:
> https://lists.w3.org/Archives/Public/ietf-http-wg/2016JulSep/0499.html

Thanks for sharing! And Tatsuhiro's description there confirms my
suspicion that the interpretation of the spec depends a lot on which
side you are developing, that's particularly bad for a spec.

Cheers,
Willy

Received on Thursday, 23 December 2021 04:08:53 UTC