Skip to content

[pull] master from ruby:master#746

Merged
pull[bot] merged 5 commits intoturkdevops:masterfrom
ruby:master
Feb 4, 2026
Merged

[pull] master from ruby:master#746
pull[bot] merged 5 commits intoturkdevops:masterfrom
ruby:master

Conversation

@pull
Copy link

@pull pull bot commented Feb 4, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

nobu and others added 5 commits February 4, 2026 16:28
Add `tool/lib` under the source directory instead of the source
directory itself, as there is no library to be loaded.
…16 responses

When a Range request returns 416 (Range Not Satisfiable), the recovery
path manually added an "Accept-Encoding: gzip" header before retrying.
This bypasses Ruby's automatic gzip decompression mechanism.

Ruby's Net::HTTP only sets decode_content=true (enabling automatic
decompression) when Accept-Encoding is NOT present in the request
headers. By manually setting this header, the decode_content flag
remained false, causing gzip-compressed response bodies to be written
directly to the compact index cache without decompression.

This resulted in "ArgumentError: invalid byte sequence in UTF-8" errors
when the corrupted cache was later read and parsed as text.

The fix removes the explicit Accept-Encoding header, allowing Ruby's
Net::HTTP to handle gzip compression transparently (as it does for all
other requests). Ruby will still add Accept-Encoding: gzip automatically
AND properly set decode_content=true for automatic decompression.

Fixes ruby/rubygems#9271

ruby/rubygems@b48b090e38
@pull pull bot locked and limited conversation to collaborators Feb 4, 2026
@pull pull bot added the ⤵️ pull label Feb 4, 2026
@pull pull bot merged commit 1258992 into turkdevops:master Feb 4, 2026
1 of 2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants