From: "NARUSE, Yui" Date: 2010-12-01T01:59:17+09:00 Subject: [ruby-core:33494] Re: [Ruby 1.9-Feature#4100] Improve Net::HTTP documentation (2010/12/01 1:30), Eric Hodel wrote: > On Nov 29, 2010, at 21:08, Yui NARUSE wrote: > >> Issue #4100 has been updated by Yui NARUSE. >> >> I reject Hunk #7 because :nodoc: method is not a public API. > > Then should the examples switch from using #error! to #value? > > (The example using #error! exists in 1.8.) Yes, it should use #value. (2010/12/01 1:37), Eric Hodel wrote: > On Nov 29, 2010, at 19:09, Yui NARUSE wrote: >> In Hunk #4, why partly using HTTP_PROXY? >> And it assumes HTTP_PROXY begins with http:// though it is not always URI. >> >> Ah, HTTP_PROXY is from original doc. > > Should we correct the example to not assume that HTTP_PROXY is a URI? > > Should we add a note mentioning that HTTP_PROXY may be either a host, host:port or URI? > (RubyGems can accept all three values so I believe that all three have been found in the wild.) If we assume the value set as HTTP_PROXY has a valid URI form (not a style like HTTP_PROXY=user:pass@example.com:8080, but HTTP_PROXY=http://user:pass@example.com:8080) proxy.host should use uri.hostname (yes, this is not #host, #hostname is correct because of IPv6 address) and port should use uri.port. -- NARUSE, Yui