From: Stephen Bannasch Date: 2007-09-10T12:13:36+09:00 Subject: Re: Next 1.8.6 on Sept. 22 --============_-1022728490==_ma============ Content-Type: text/plain; charset="us-ascii" ; format="flowed" At 10:50 PM +0900 9/9/07, Urabe Shyouhei wrote: >Hi all. > >We're planning to release 1.8.6 fixes on Sept. 22(Sat). If you find >something that should be included (but not yet) to it, please let us >know. I have a patch to fix a small problem in net/http.rb. I have written to Minero Aoki about a week ago and didn't hear back. 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. At 3:31 AM -0500 2/11/07, Stephen Bannasch wrote: >There is an annoying bug (??) in the tomcat server on >tels-develop.soe.berkeley.edu:8080 >that serves up the jnlps. If I >make an HTTP GET request and do NOT include a 'User-Agent:' header >the server responds with a 'HTTP/1.1 500 Internal Server Error'. Of course this is a stupid problem on the web servers part but this is how I patch net/http.rb to fix this problem on Ruby's end. This is a svn diff on a checkout of the lib/net dir from here: http://svn.ruby-lang.org/repos/ruby/tags/v1_8_6_101/lib/net/ Index: http.rb =================================================================== --- http.rb (revision 13423) +++ http.rb (working copy) @@ -1468,6 +1468,7 @@ @path = path initialize_http_header initheader self['Accept'] ||= '*/*' + self['User-Agent'] ||= 'Ruby' @body = nil @body_stream = nil end Do you think this should be added to net/http.rb? It will fix a small but annoying bug. If you agree -- the fix should be applied to trunk also. --============_-1022728490==_ma============ Content-Type: text/html; charset="us-ascii" Re: Next 1.8.6 on Sept. 22
At 10:50 PM +0900 9/9/07, Urabe Shyouhei wrote:
Hi all.

We're planning to release 1.8.6 fixes on Sept. 22(Sat).  If you find
something that should be included (but not yet) to it, please let us
know.

I have a patch to fix a small problem in net/http.rb. I have written to Minero Aoki <aamine@loveruby.net> about a week ago and didn't hear back.

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.

At 3:31 AM -0500 2/11/07, Stephen Bannasch wrote:
There is an annoying bug (??) in the tomcat server on
tels-develop.soe.berkeley.edu:8080 that serves up the jnlps. If I
make an HTTP GET request and do NOT include a 'User-Agent:' header
the server responds with a 'HTTP/1.1 500 Internal Server Error'.

Of course this is a stupid problem on the web servers part but this is how I patch net/http.rb to fix this problem on Ruby's end.

This is a svn diff on a checkout of the lib/net dir from here:

  http://svn.ruby-lang.org/repos/ruby/tags/v1_8_6_101/lib/net/

Index: http.rb
===================================================================
--- http.rb     (revision 13423)
+++ http.rb     (working copy)
@@ -1468,6 +1468,7 @@
       @path = path
       initialize_http_header initheader
       self['Accept'] ||= '*/*'
+      self['User-Agent'] ||= 'Ruby'
       @body = nil
       @body_stream = nil
     end

Do you think this should be added to net/http.rb? It will fix a small but annoying bug.

If you agree -- the fix should be applied to trunk also.
--============_-1022728490==_ma============--