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

elixir-mint / mint
91%
main: 90%

Build:
Build:
LAST BUILD BRANCH: fix/http2-validate-request-fields
DEFAULT BRANCH: main
Repo Added 11 Jun 2022 07:10AM UTC
Token xUOJjt5H7KcTvx6ikZQ7qWuMslrGKsjIE regen
Build 412 Last
Files 22
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 http2-header-block-bound
branch: http2-header-block-bound
CHANGE BRANCH
x
Reset
Sync Branches
  • http2-header-block-bound
  • al/1.18
  • al/bump-ci
  • al/ci
  • al/client-settings
  • al/deps
  • al/elixir-1.10
  • al/elixir-1.11+
  • al/fix-leak
  • al/fix-tests
  • al/http2-logs
  • al/improve-defguard
  • al/modernize-ci
  • al/stream-docs
  • al/update-ci-versions
  • al/updates
  • allow-not-validating-target
  • allow_302_for_twitter_integration_test
  • andrea/code-coverage
  • andrea/dialyzer
  • andrea/fix-guard
  • andrea/new-ci-versions
  • apply-http2-client-settings
  • check-http2-content-length
  • chore/replace-deprecated-xref-exclude
  • clamp-tunnel-timeout
  • close_sockets_on_error
  • comp-time-optimization
  • configurable-test-ports
  • connect-tunnel-fixes
  • connection-docs-ref
  • contributing-and-testing-housekeeping
  • dialyzer-without-ignore-file
  • docs-for-open
  • dont-close-socket-on-recv-timeout
  • ericmj/deprecate-read-write
  • ericmj/fix-1xx-informational-response
  • ericmj/http2-connection-window-size
  • ericmj/http2-larger-default-windows
  • ericmj/inet4-option
  • ericmj/local-h2c-integration-tests
  • ericmj/support-elixir-1.12
  • ericmj/update-ubuntu
  • fix-cannot-build-docker-image-using-podman-compose
  • fix-dialyzer
  • fix-http1-tests-not-tagged-correctly
  • fix-incorrect-ci-badge
  • fix-warnings
  • fix/446-proxy-host-header
  • fix/http10-connect-tunnel
  • fix/http2-validate-request-fields
  • fix/humize_error_code_custom_error
  • forward-proxy-mode
  • fuzz-http1-mid-scenario-requests
  • fuzz-http1-transfer-codings
  • fuzz-http2-close-listen-socket
  • fuzz-http2-connect-tunnel
  • fuzz-http2-connection-window
  • http-fuzz-properties
  • http1-1xx-close
  • http1-empty-te
  • http1-followups
  • http1-header-parsing
  • http1-line-size-limit
  • http1-pipelining
  • http1-reason-phrase
  • http1-rfc9112-body-rules
  • http1-te-parameters
  • http1-upgrade-pipelined
  • http2-connect-204
  • http2-connect-target
  • http2-followups
  • http2-frame-validation
  • http2-header-list-size-docs
  • http2-push-origin-docs
  • http2-push-target-validation
  • http2-remove-infinity-branches
  • http2-response-semantics
  • http2-server-push
  • https-tunnel-proxies
  • ignore-http2-window-update-on-closed-streams
  • ip-address-match-fun
  • ipv6-host-header
  • jv-default-store
  • jv-elixir-1-19
  • keep-http1-state-after-pipelined-responses
  • main
  • next_body_chunk
  • np/export-error-types
  • optimize-http/2-request-creation
  • patch-3
  • preserve_header_case
  • pvthuyen/add-support-for-cacerts-get
  • refs/heads/main
  • refs/pull/399/merge
  • refs/pull/407/merge
  • refs/pull/500/merge
  • return-responses-in-parse-order
  • rewrite-contributing-and-testing-doc
  • run-ci-against-erlang-27.1
  • stream-http1-headers
  • test-followups
  • test-http2-interim-no-101
  • tunnel-target-identity
  • unnecessary-rst-stream-2
  • unsafe-proxy-opts
  • update-deps
  • use-hpax-protocol-resize
  • use_local_http_bin_in_all_tests
  • v1.10
  • validate-http2-response-headers
  • whatyouhide/issue311
  • wm-decompression
  • wm-docker-compose
  • wm-recv-response
  • wrap-tunnel-errors

28 Sep 2026 02:57PM UTC coverage: 90.527% (+0.02%) from 90.508%
81963866cf257fb72795ce007863408c93f574d7-PR-531

Pull #531

github

ericmj
Bound buffered header blocks by the encoded size of the list limit

While waiting for CONTINUATION frames, the client compared the size of
the buffered compressed header block with its advertised
SETTINGS_MAX_HEADER_LIST_SIZE, assuming a compressed block is never
larger than the header list it decodes to. Huffman coding can make a
string longer than its octets (RFC 7541 5.2), so a valid block whose
decoded list is under the limit could exceed it on the wire. With a
limit of 1,000 bytes, a 475-byte header list that encodes to 1,307
bytes was accepted in a single HEADERS frame and closed the connection
with PROTOCOL_ERROR when split over HEADERS and CONTINUATION.

The limit is enforced on the decoded header list, and the fragments
buffered before END_HEADERS are bounded by an upper bound on the encoded
size of a header list within the limit, assuming minimal integer
representations (RFC 7541 5.1) and at most two dynamic table size
updates (RFC 7541 4.2). HPACK decoders accept redundant zero
continuation bytes in integers and any number of size updates, so no
finite bound covers every block that decodes to such a list. The
fragment that carries END_HEADERS isn't counted, and the complete block
is then judged by its decoded size.

A Huffman-coded octet takes at most 30 bits (RFC 7541 Appendix B). A
minimal integer below 2^32 takes at most 6 bytes, so a field has at
most 13 bytes of prefixes and integers (a representation byte, the name
length and the value length) and less than 2 bytes of Huffman padding,
15 bytes in total. That's less than the 120 bytes its 32-byte overhead
(RFC 9113 6.5.2) contributes at the 30/8 ratio. The two size updates
take at most 6 bytes each. The bound is
max_header_list_size * 30 / 8 + 12 bytes, and a peer that buffers more
than that gets a connection error.
Pull Request #531: Bound buffered header blocks by the encoded size of the list limit

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

1 existing line in 1 file now uncovered.

1787 of 1974 relevant lines covered (90.53%)

722.33 hits per line

Relevant lines Covered
Build:
Build:
1974 RELEVANT LINES 1787 COVERED LINES
722.33 HITS PER LINE
Source Files on http2-header-block-bound
  • Tree
  • List 22
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
81963866... http2-header-block-bound Bound buffered header blocks by the encoded size of the list limit While waiting for CONTINUATION frames, the client compared the size of the buffered compressed header block with its advertised SETTINGS_MAX_HEADER_LIST_SIZE, assuming a compresse... Pull #531 16 Oct 2026 01:07PM UTC ericmj github
90.53
See All Builds (344)

Badge your Repo: mint

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