Project

General

Profile

Actions

Bug #435

closed

open-uri.rb 407 Proxy Authentication Required (OpenURI::HTTPError)

Added by Anonymous about 16 years ago. Updated over 13 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
[ruby-core:18262]

Description

=begin
Even if i set in /usr/lib/ruby/1.8/open-uri.rb proxy settings like that:
module OpenURI
Options = {
:proxy => "http://user:password@192.168.1.1:8080",
:progress_proc => true,
:content_length_proc => true,
:http_basic_authentication => true
}
i will get 407 error.

To fix that replace:
if proxy
klass = Net::HTTP::Proxy(proxy.host, proxy.port)
end
with:
if proxy
klass = Net::HTTP::Proxy(proxy.host, proxy.port, proxy.user, proxy.password)
end
=end


Related issues 4 (0 open4 closed)

Related to Ruby master - Feature #3848: Using http basic authentication for FTP with Open URIClosedakr (Akira Tanaka)Actions
Related to Ruby master - Feature #4071: support basic auth for Net::HTTP.get requestsClosed11/19/2010Actions
Related to Ruby master - Bug #4388: open-uriで環境変数http_proxyを使うときに認証付きのProxyが使えませんRejectedActions
Related to Ruby master - Feature #12921: Retrieve user and password for proxy from envClosedActions
Actions #1

Updated by akr (Akira Tanaka) almost 16 years ago

  • Status changed from Open to Rejected

=begin
open-uri doesn't support password in URI for security reason.
=end

Updated by bytheway (Ben Bytheway) over 13 years ago

=begin
Can this rejection be rethought? This use of proxy url with user and password is a currently accepted way of being able to authenticate to a proxy.

Because open-uri doesn't honor this style of url, there is literally no way for me to use any ruby application which relies on open-uri to access web resources.
=end

Actions #3

Updated by shyouhei (Shyouhei Urabe) almost 8 years ago

  • Related to Feature #12921: Retrieve user and password for proxy from env added
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0