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

elixir-mint / mint
90%

Build:
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 main
branch: SELECT
CHANGE BRANCH
x
Sync Branches
  • No branch selected
  • 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-block-bound
  • 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

25 Oct 2026 03:32PM UTC coverage: 90.476% (+0.08%) from 90.398%
7223c00ca363d295fb80b48167838d535cacbac6

push

github

web-flow
Validate HTTP/2 request methods, targets and header fields (#545)

* Validate HTTP/2 request methods, targets and header fields

Mint.HTTP2.request/5 lowercased the header names it was given and
HPACK-encoded everything else as is, and stream_request_body/3 did the
same for trailers. A method, :path, CONNECT target, header name or
header value containing CR, LF or NUL, a header name containing a space
or a colon, or a value with leading or trailing whitespace was sent to
the server unchanged. Mint.HTTP1 rejects all of these, and Mint.HTTP2
rejects them in responses since #504, so the behaviour of a request
depended on which protocol ALPN negotiated.

RFC 9113 8.2.1 forbids these characters in field names and values and
says a sender must not generate such a message. HTTP/2 framing isn't
confused by them, but an intermediary that forwards the request over
HTTP/1.1 without re-validating the fields turns an injected CRLF into
request header injection or request splitting on its back-end
connection, so an application that is safe against an HTTP/1 origin
isn't once the origin or a CDN in front of it enables HTTP/2.

Requests and trailers are now validated before a stream is opened, with
the field rules already used for responses: the method must be a token
(RFC 9110 9.1), :path and the CONNECT :authority must be non-empty
field values (RFC 9113 8.3.1), pseudo-header names passed by the caller
must be valid field names, and trailers can't carry pseudo-headers (RFC
9113 8.1). Invalid input fails with :invalid_request_method,
:invalid_request_target, :invalid_header_name or :invalid_header_value,
like in Mint.HTTP1, and the connection stays open without the request
taking up a stream. The messages for the two header errors no longer
mention the response, since they now apply to requests as well.

* Validate caller-supplied HTTP/2 method fields

* Clarify HTTP/2 request field validation documentation

---------

Co-authored-by: Eric Meadows-Jönsson <eric.mead... (continued)

28 of 29 new or added lines in 1 file covered. (96.55%)

1843 of 2037 relevant lines covered (90.48%)

747.59 hits per line

Relevant lines Covered
Build:
Build:
2037 RELEVANT LINES 1843 COVERED LINES
747.59 HITS PER LINE
Source Files on main
  • Tree
  • List 22
  • 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
7223c00c... main Validate HTTP/2 request methods, targets and header fields (#545) * Validate HTTP/2 request methods, targets and header fields Mint.HTTP2.request/5 lowercased the header names it was given and HPACK-encoded everything else as is, and stream_requ... push 25 Oct 2026 03:33PM UTC web-flow github
90.48
f0023243... fix/http2-validate-request-fields Clarify HTTP/2 request field validation documentation Pull #545 25 Oct 2026 03:31PM UTC ericmj github
90.62
75d7f7db... fix/http2-validate-request-fields Validate HTTP/2 request methods, targets and header fields Mint.HTTP2.request/5 lowercased the header names it was given and HPACK-encoded everything else as is, and stream_request_body/3 did the same for trailers. A method, :path, CONNECT target... Pull #545 25 Oct 2026 03:04PM UTC bmalum github
90.78
d54ba54a... main Fail requests pipelined behind a 101 response (#529) After a 101 response the connection stayed open with the queued requests in place, so bytes arriving later, which belong to the protocol the server switched to (RFC 9110 15.2.2), were parsed as... push 23 Oct 2026 09:02AM UTC web-flow github
90.4
5c51742a... fuzz-http1-transfer-codings Generate transfer codings with chunked first and last in the HTTP/1 fuzz Responses with more than one transfer coding could come up, as a generated Transfer-Encoding: chunked plus a random Transfer-Encoding: gzip header, but no invariant compared... Pull #543 16 Oct 2026 01:14PM UTC ericmj github
90.46
ec007b03... fuzz-http2-connect-tunnel Treat 2xx responses to CONNECT as tunnels in the HTTP/2 fuzz model The fuzz property required zero body bytes for every 204 response. A 2xx response to CONNECT establishes a tunnel and the DATA frames after it are tunnel data (RFC 9110 section 9.... Pull #539 16 Oct 2026 01:14PM UTC ericmj github
90.41
5677ece7... fuzz-http2-connection-window Derive the HTTP/2 fuzz model's connection window from client frames The model seeded the server's view of the connection window from Mint's own receive_window_remaining, so a client that kept a 16,777,216-byte window internally without sending th... Pull #542 16 Oct 2026 01:13PM UTC ericmj github
90.51
89cfcce1... fuzz-http2-close-listen-socket Close the HTTP/2 test server listen socket after accepting TestServer.listen_and_accept/0 opened a TLS listen socket that nothing closed, so every HTTP/2 fuzz scenario left a listener behind: 200 scenarios grew the tcp_inet ports from 1 to 201 an... Pull #541 16 Oct 2026 01:13PM UTC ericmj github
90.71
0ed0a9a1... test-http2-interim-no-101 Exclude 101 from random interim statuses in the HTTP/2 1xx test The "multiple before a single HEADERS" test picked each interim status from 100..199 and expected Mint to accept it. Mint rejects 101 in HTTP/2 since RFC 9113 section 8.6 doesn't sup... Pull #538 16 Oct 2026 01:13PM UTC ericmj github
90.51
1209878a... fuzz-http1-mid-scenario-requests Run mid-scenario requests in the HTTP/1 fuzz property Client operations are {index, :body, ref_index, chunk} or {index, :request, {method, body}}, but the comprehension that picks the operations for the current chunk only matched four-element tup... Pull #540 16 Oct 2026 01:13PM UTC ericmj github
90.41
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