Project

General

Profile

Actions

Bug #11194

closed

Refactor env-sourced proxy logic for uri/generic

Added by headius (Charles Nutter) over 9 years ago. Updated over 3 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:69398]
Tags:

Description

For https://github.com/jruby/jruby/issues/2983 we are modifying uri/generic.rb's find_proxy logic to also check the JVM properties used to configure proxies.

The diff is here: https://gist.github.com/headius/6272d168cf165ddf675f

There are two changes:

  1. The logic for looking up proxy host and non-proxy addresses from ENV has been pulled out into private utility methods. This change should be zero-sum, and I'd like to commit it to HEAD.
  2. Additional logic has been added for looking up JVM properties.

I will proceed with the refactor in (1) regardless, but I need community help:

  • Any concerns about adding these methods?
  • Could we perhaps check RUBY_ENGINE and put the JRuby logic in the canonical uri/generic.rb?

Currently we maintain our own fork of stdlib, and if ruby-core folks don't mind we'd REALLY like to get rid of it. That requires adding a few RUBY_ENGINE checks to MRI's stdlib.

Thoughts?

Updated by headius (Charles Nutter) over 9 years ago

The net/http changes can be ignored; they remove an earlier incorrect mechanism for honoring the JVM properties.

Updated by headius (Charles Nutter) over 3 years ago

This has been addressed in the URI gem by https://github.com/ruby/uri/pull/18.

Actions #3

Updated by jeremyevans0 (Jeremy Evans) over 3 years ago

  • Status changed from Open to Closed
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0