• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

elixir-mint / hpax / 18a42a5e469c409d13fdfb0f3f44715de8e5af22-PR-26
96%
main: 96%

Build:
Build:
LAST BUILD BRANCH: fix/static-table-empty-values
DEFAULT BRANCH: main
Ran 25 Jul 2026 02:15AM UTC
Jobs 1
Files 4
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

25 Jul 2026 02:13AM UTC coverage: 95.882% (+0.02%) from 95.858%
18a42a5e469c409d13fdfb0f3f44715de8e5af22-PR-26

Pull #26

github

mtrudel
Use empty binary, not nil, for static table entries with no default value

HPAX.Table's @static_table stored `nil` as the value for the many
static entries that have no default (RFC 7541, Appendix A - e.g.
:authority, host, user-agent). Decoding a plain Indexed Header Field
Representation (section 6.1) against one of these entries - fully
legal per the RFC, and something real HTTP/2 clients (and h2spec) do
- returned that literal `nil` as the header value, silently violating
this module's own documented contract that decoded values are always
binaries (HPAX.header_value() :: binary()).

Any caller relying on that contract (e.g. calling byte_size/1 on
every decoded value) would crash on such a request. This also meant
the encoder could never emit a compact single-byte indexed reference
when asked to encode one of these headers with a literal empty-string
value, since the {:full, index} match required by lookup_by_header/3
was guarded with `is_binary(value)` and so never fired for the
nil-valued entries.

Storing "" instead of nil fixes both: decoded values are always
binaries as documented, and encoding a header whose value happens to
be "" for one of these names now correctly compresses to one byte.
Pull Request #26: Fix two decode crashes surfaced by h2spec: invalid Huffman padding, and nil static-table values

1 of 1 new or added line in 1 file covered. (100.0%)

163 of 170 relevant lines covered (95.88%)

3838.77 hits per line

Jobs
ID Job ID Ran Files Coverage
1 18a42a5e469c409d13fdfb0f3f44715de8e5af22-PR-26.1 25 Jul 2026 02:15AM UTC 4
95.88
GitHub Action Run
Source Files on build 18a42a5e469c409d13fdfb0f3f44715de8e5af22-PR-26
  • Tree
  • List 4
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #26
  • PR Base - main (#8D9C57AB...)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc