From: Tanaka Akira Date: 2007-11-05T01:54:42+09:00 Subject: Re: patch for lib/net/http.rb, self['User-Agent'] ||= 'Ruby' In article <9079DC13-476F-4C12-922E-E197BD5AAA5C@loveruby.net>, Minero Aoki writes: >> After applying this patch the 'User-Agent:' header is set to 'Ruby' >> unless it is already defined. > >> + self['User-Agent'] ||= 'Ruby' > > OK, I have commited your patch in trunk (Ruby 1.9). > I guess it will be forbidden by someone, like libwww-perl. % ruby -rnet/http -e 'Net::HTTP.start("www.google.com") {|h| p h.get("/search?q=foo", "User-Agent"=>"libwww") }' # -- Tanaka Akira