0

According to the http2 protocol, the client and the server need to maintain the same static and dynamic dictionary.

For a server, it receives compressed headers from many different clients.

For the header compressed content sent by a client, will it search only in this user's dictionary or all dictionaries?.

If the query is only in the dictionary of a specific client, how does it determine which dictionary the request comes from?

In addition, when does the user's dictionary stored in the server expire?

Mr.Tan
  • 3
  • 3

1 Answers1

0

Client and server maintain a per-connection state that stores the static and dynamic tables that contain the HTTP headers exchanged between the two peers.

There is no concept of "user", just that of connection.

For a client that opens multiple TCP connections, each connection will have a different dynamic table (the static table is the same for all connections from all clients and it's specified by the HTTP/2 here).

For all HTTP/2 streams in a connection, the dynamic table is updated by both client and server, so it's always in sync.

Being tied to a TCP connection, the dynamic table is thrown away when the connection is closed.

Community
  • 1
  • 1
sbordet
  • 16,856
  • 1
  • 50
  • 45