haskell-grpc-native / http2-client

A native HTTP2 client in Haskell
BSD 3-Clause "New" or "Revised" License
43 stars 27 forks source link

Handle SETTINGS_MAX_HEADER_LIST_SIZE #8

Open lucasdicioccio opened 7 years ago

lucasdicioccio commented 7 years ago

We could error early if a client tries to send too many headers at once (it's unclear to me whether the RFC refers to a per-frame limitation or a total limitation). The RFC is permissive as to whether it allows senders to overpass the limit:

SETTINGS_MAX_HEADER_LIST_SIZE (0x6):  This advisory setting informs a
      peer of the maximum size of header list that the sender is
      prepared to accept, in octets.  The value is based on the
      uncompressed size of header fields, including the length of the
      name and value in octets plus an overhead of 32 octets for each
      header field.

We should at least provide a function to check whether headers are too large and let library users make their own decisions to use this information or not.

lucasdicioccio commented 7 years ago

This bug is very related to #4 , hence hard.