Skip to content
  • Samuel Giddins's avatar
    b69bbf58
    [rubygems/rubygems] User bundler UA when downloading gems · b69bbf58
    Samuel Giddins authored
    Gem::RemoteFetcher uses Gem::Request, which adds the RubyGems UA.
    Gem::RemoteFetcher is used to download gems, as well as the full index.
    We would like the bundler UA to be used whenever bundler is making
    requests.
    
    This PR also avoids unsafely mutating the headers hash on the shared
    `Gem::RemoteFetcher.fetcher` instance, which could cause corruption or
    incorrect headers when making parallel requests. Instead, we create one
    remote fetcher per rubygems remote, which is similar to the connection
    segregation bundler is already doing
    
    https://github.com/rubygems/rubygems/commit/f0e8dacdec
    b69bbf58
    [rubygems/rubygems] User bundler UA when downloading gems
    Samuel Giddins authored
    Gem::RemoteFetcher uses Gem::Request, which adds the RubyGems UA.
    Gem::RemoteFetcher is used to download gems, as well as the full index.
    We would like the bundler UA to be used whenever bundler is making
    requests.
    
    This PR also avoids unsafely mutating the headers hash on the shared
    `Gem::RemoteFetcher.fetcher` instance, which could cause corruption or
    incorrect headers when making parallel requests. Instead, we create one
    remote fetcher per rubygems remote, which is similar to the connection
    segregation bundler is already doing
    
    https://github.com/rubygems/rubygems/commit/f0e8dacdec
Loading