Project

General

Profile

Actions

Backport #8645

closed

URI#find_proxy failure if scheme is nil

Added by djberg96 (Daniel Berger) almost 11 years ago. Updated almost 11 years ago.


Description

If the URI scheme is not present after a URI.parse call, the call to URI#find_proxy fails.

require 'uri'
u = URI.parse("ruby-lang.org")
u.find_proxy

The result is:

c:/ruby2/lib/ruby/2.0.0/uri/generic.rb:1614:in find_proxy': undefined method downcase' for nil:NilClass (NoMethodError)

This actually happens in 1.9.x as well.

I'm not sure what it should return in this case, but it shouldn't raise that error.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0