Repository navigation
Raise NIF download response-header limit for GitHub redirects - #113
Conversation
|
Just for reference, the Phoenix Tailwind package had to do the same thing, bumping the limit instead to |
Thanks for the quick response. Feel free to close if you have a more proper solution! |
philss
left a comment
There was a problem hiding this comment.
Thanks for the PR!
It looks good to me. I should release tomorrow or Sunday, but I will let you know.
GitHub's release-download redirect now sends ~11 KB of headers, past
:httpc's 10240-byte default, so every precompiled NIF download (lumis,
mdex_native) failed with {:header_too_long, {:max, 10240}}: in Docker, on
CI, on any machine without the NIFs cached. A deps.get alias patches the
dep after each fetch until a rustler_precompiled release fixes
philss/rustler_precompiled#113.
apps/gamend_core and apps/gamend_web keep their own deps/, so each carries the alias. Also the blank line apps/gamend_web/mix.exs was missing for the format check.
GitHub's release-download redirect now sends ~11 KB of headers, past
:httpc's 10240-byte default, so every precompiled NIF download (lumis,
mdex_native) failed with {:header_too_long, {:max, 10240}}: in Docker, on
CI, on any machine without the NIFs cached. A deps.get alias patches the
dep after each fetch until a rustler_precompiled release fixes
philss/rustler_precompiled#113.
|
Independently reproduced and verified, for what it helps: on Elixir 1.20.4 / OTP 29.1.1 with |
|
@chevinbrown this is now released in @themiguelamador thanks for the workaround instructions! |
GitHub release downloads can now fail on OTP 29.0.6 with
{:header_too_long, {:max, 10240}}before reaching the release asset. The initial redirect carries a large Content-Security-Policy header: the responses inspected on October 23 had a 9,217-byte CSP and roughly 10.9 KiB of headers in total, exceeding:httpc's 10 KiB default.Set
max_header_size: 65_536in the:httpcrequest options, allowing these redirects while keeping a finite response-header limit. This is a one-line production change; TLS verification, redirect handling, and artifact checksum verification retain their existing behavior.The observed CSP enumerates the new storage hosts in GitHub's October 22 Actions blob-storage announcement. This appears to explain the growth, although the announcement itself does not document a CSP change. The same large CSP was present on downloads from unrelated release repositories.
Validation:
{:header_too_long, {:max, 10240}}and passes afterward, retaining checksum and extraction coverage.:httpcversions ignore the unrecognized option and may log that it was ignored. OTP 26 was not run locally.mix format --check-formattedandMIX_ENV=test mix compile --warnings-as-errorspass.