Skip to content

Raise httpc's header limit for precompiled downloads - #98

Merged
josevalim merged 1 commit into
elixir-lang:masterfrom
aptinio:raise-httpc-header-limit
Oct 24, 2026
Merged

josevalim merged 1 commit into
elixir-lang:masterfrom
aptinio:raise-httpc-header-limit

Conversation

@aptinio

@aptinio aptinio commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

GitHub's release-download redirects now send about 11 KB of response headers. Erlang/OTP 29.0.6, 28.5.0.6 and 27.3.4.17 added an httpc max_header_size request option that defaults to 10,240 bytes, so precompiled NIF downloads fail there:

couldn't fetch NIF from https://github.com/akash-akya/vix/releases/download/v0.42.0/vix-nif-2.16-x86_64-linux-gnu-0.42.0.tar.gz: {:error, {:header_too_long, {:max, 10240}}}

This raises the limit to 64 KiB, as philss/rustler_precompiled#113 does. Older releases log a notice and ignore the option. The new test can only fail on a release that enforces the limit, so on OTP 25 it passes either way.

GitHub's release-download redirects now send about 11 KB of response
headers, most of it a content-security-policy. That exceeds the 10 KiB
max_header_size httpc enforces by default in recent Erlang/OTP patch
releases, so precompiled NIF downloads fail with header_too_long. Raise
the limit to 64 KiB for these requests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants