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

elixir-mint / hpax
96%
main: 96%

Build:
Build:
LAST BUILD BRANCH: fix/static-table-empty-values
DEFAULT BRANCH: main
Repo Added 24 Sep 2021 06:42AM UTC
Token w95jYetSpXwTO5No1xBXiaiwdSAxLPGlS regen
Build 51 Last
Files 4
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

LAST BUILD ON BRANCH fix/huffman-decode-invalid-encoding
branch: fix/huffman-decode-invalid-encoding
CHANGE BRANCH
x
Reset
Sync Branches
  • fix/huffman-decode-invalid-encoding
  • al/1.18
  • al/elixir-req
  • al/huffman
  • al/update-elixir
  • andrea/coverage
  • andrea/dialyzer-in-ci
  • andrea/fix-ci
  • deprecation_warnings
  • elixir-1.17
  • fix-warnings
  • fix/static-table-empty-values
  • fix_resize
  • main
  • table_size_fixes
  • wm-fix-warnings
  • wm-validate-header

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

Relevant lines Covered
Build:
Build:
170 RELEVANT LINES 163 COVERED LINES
3838.77 HITS PER LINE
Source Files on fix/huffman-decode-invalid-encoding
  • Tree
  • List 4
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
18a42a5e... fix/huffman-decode-invalid-encoding 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... Pull #26 25 Jul 2026 02:15AM UTC mtrudel github
95.88
7719986d... fix/huffman-decode-invalid-encoding Raise a catchable error on malformed Huffman-coded input HPAX.Huffman.decode/1 only handled two "end of input" cases: an exhausted binary, and 1-7 leftover bits that form valid EOS padding. Any input that leaves 8 or more trailing bits which don'... Pull #26 25 Jul 2026 01:41AM UTC mtrudel github
95.88
See All Builds (47)

Badge your Repo: hpax

We detected this repo isn’t badged! Grab the embed code to the right, add it to your repo to show off your code coverage, and when the badge is live hit the refresh button to remove this message.

Could not find badge in README.

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

Refresh
  • Settings
  • Repo on GitHub
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