[#1816] Ruby 1.5.3 under Tru64 (Alpha)? — Clemens Hintze <clemens.hintze@...>

Hi all,

17 messages 2000/03/14

[#1989] English Ruby/Gtk Tutorial? — schneik@...

18 messages 2000/03/17

[#2241] setter() for local variables — ts <decoux@...>

18 messages 2000/03/29

[ruby-talk:01766] Bug in latest net/http

From: Dave Thomas <Dave@...>
Date: 2000-03-06 22:31:11 UTC
List: ruby-talk #1766
The fix to differentiate user headers in the latest lib/htp means that 
Net::HTTP#get now always returns [nil, xxx]. The problem lies in
#connecting, where the result of the yield is not saved:

    def connecting( u_header )
      u_header = procheader( u_header )

      if not @socket then
        u_header['Connection'] = 'Close'
        start
      elsif @socket.closed? then
        @socket.reopen
      end

      yield

      unless keep_alive? u_header then
        @socket.close
      end
    end

I _think_ it should be

      result = yield

      unless keep_alive? u_header then
        @socket.close
      end

      return result
   end

I'd submit a patch, but I'm not sure if thius problem occurs elsewhere 
too.

Regards


Dave

In This Thread

Prev Next