[#4766] Wiki — "Glen Stampoultzis" <trinexus@...>

21 messages 2000/09/04
[#4768] RE: Wiki — "NAKAMURA, Hiroshi" <nahi@...> 2000/09/04

Hi, Glen,

[#4783] Re: Wiki — Masatoshi SEKI <m_seki@...> 2000/09/04

[#4785] Re: Wiki — "NAKAMURA, Hiroshi" <nakahiro@...> 2000/09/05

Howdy,

[#4883] Re-binding a block — Dave Thomas <Dave@...>

16 messages 2000/09/12

[#4930] Perl 6 rumblings -- RFC 225 (v1) Data: Superpositions — Conrad Schneiker <schneik@...>

Hi,

11 messages 2000/09/15

[#4936] Ruby Book Eng. translation editor's questions — Jon Babcock <jon@...>

20 messages 2000/09/16

[#5045] Proposal: Add constants to Math — Robert Feldt <feldt@...>

15 messages 2000/09/21

[#5077] Crazy idea? infix method calls — hal9000@...

This is a generalization of the "in" operator idea which I

17 messages 2000/09/22

[#5157] Compile Problem with 1.6.1 — Scott Billings <aerogems@...>

When I try to compile Ruby 1.6.1, I get the following error:

15 messages 2000/09/27

[ruby-talk:5038] Re: Having problems with Net::HTTP::do_finish

From: Minero Aoki <aamine@...>
Date: 2000-09-20 23:03:25 UTC
List: ruby-talk #5038
  In mail "[ruby-talk:5033] Having problems with Net::HTTP::do_finish"
    Dan Schmidt <dfan@harmonixmusic.com> wrote:

> I just started using Ruby yesterday, and I'm having trouble with my
> first real program.  The following minimal example demonstrates the
> problem I'm encountering:

I could not reproduce this bug on my linux box. Then
could you tell me the result (stderr) of code below,
after using [ruby-dev:10990] patch? I attach it to
this mail again.

(test code)
require 'net/http'
http = Net::HTTP.new('www.ruby-lang.org')
http.set_pipe $stderr
http.start {}

p.s.
many thanks to Aleksi for interpreting my Japanese mails.


Minero Aoki

--- org.http.rb	Thu Sep 21 06:26:21 2000
+++ http.rb	Thu Sep 21 06:26:47 2000
@@ -238,6 +238,7 @@
 
 require 'net/protocol'
 
+$stderr.sync = true
 
 module Net
 
@@ -392,21 +393,26 @@
     def keep_alive?( header, resp )
       if resp.key? 'connection' then
         if /keep-alive/i === resp['connection'] then
+$stderr.puts '[C] Connection true'
           return true
         end
       elsif resp.key? 'proxy-connection' then
         if /keep-alive/i === resp['proxy-connection'] then
+$stderr.puts '[C] Proxy Connection true'
           return true
         end
       elsif header.key? 'Connection' then
         if /keep-alive/i === header['Connection'] then
+$stderr.puts '[C] user Connection true'
           return true
         end
       else
         if @command.http_version == '1.1' then
+$stderr.puts '[C] HTTP1.1 true'
           return true
         end
       end
+$stderr.puts '[C] connection close'
 
       false
     end
@@ -432,8 +438,11 @@
 
     # called when connecting
     def do_finish
+$stderr.puts "[F] addr=#{address} port=#{port}"
+$stderr.puts "[F] closed=#{@socket.closed?}"
+$stderr.puts "[F] critical=#{@command.send :critical?}"
       unless @socket.closed? then
-        head2 '/', { 'Connection' => 'close' }
+#        head2 '/', { 'Connection' => 'close' }
       end
     end
 

In This Thread