Skip to main content
0x9

COMPRESSION_ERROR

Connection-levelRFC 9113 §7

COMPRESSION_ERROR (0x9) is sent when there is an error in the HPACK header compression state. HTTP/2 uses HPACK (RFC 7541) for header compression, and the HPACK compression context is shared across all streams on a connection. Any HPACK error is unrecoverable and requires closing the entire connection.

Code

0x9

Decimal

9

Standard

RFC 9113 §7

Description

HPACK compression in HTTP/2 maintains a dynamic table shared across all streams on a connection. Because the dynamic table is connection-scoped, any error in HPACK processing – invalid Huffman encoding, dynamic table size change out of bounds, or a header block that fails to decode – is a connection-level error. COMPRESSION_ERROR always closes the entire connection. This is one reason HTTP/3 switched to QPACK with per-stream contexts, making compression errors stream-recoverable rather than connection-fatal.

Common Causes

  • Invalid Huffman encoding in HPACK header block
  • Dynamic table size update out of allowed bounds
  • HPACK literal header with invalid index
  • Header block that references a non-existent dynamic table entry
  • Implementation bug in HPACK encoder/decoder