From: Stephen Bannasch Date: 2007-10-31T22:28:52+09:00 Subject: patch for lib/net/http.rb, self['User-Agent'] ||= 'Ruby' I posted this patch before in the middle of another thread and didn't get any feedback so I'm posting it again. Here's a link to my original message with a longer description of the problem: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/12107 Basically there are some web servers which return a 'HTTP/1.1 500 Internal Server Error' when an HTTP GET request is made and the 'User-Agent:' header is not present. After applying this patch the 'User-Agent:' header is set to 'Ruby' unless it is already defined. Index: lib/net/http.rb =================================================================== --- lib/net/http.rb (revision 13794) +++ lib/net/http.rb (working copy) @@ -1471,6 +1471,7 @@ @path = path initialize_http_header initheader self['Accept'] ||= '*/*' + self['User-Agent'] ||= 'Ruby' @body = nil @body_stream = nil end