[#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:5033] Having problems with Net::HTTP::do_finish

From: Dan Schmidt <dfan@...>
Date: 2000-09-20 17:40:01 UTC
List: ruby-talk #5033
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:

-- foo.rb --
require 'net/http'
Net::HTTP.start ('www.ruby-lang.org') { |x| }

-- results --
d:/src $ ruby foo.rb 
C:/APP/RUBY/lib/ruby/1.6/net/protocol.rb:578:in `sysread': End of file reached (EOFError)
	from C:/APP/RUBY/lib/ruby/1.6/net/protocol.rb:578:in `fill_rbuf'
	from C:/APP/RUBY/lib/ruby/1.6/net/protocol.rb:523:in `readuntil'
	from C:/APP/RUBY/lib/ruby/1.6/net/protocol.rb:533:in `readline'
	from C:/APP/RUBY/lib/ruby/1.6/net/http.rb:751:in `get_reply'
	from C:/APP/RUBY/lib/ruby/1.6/net/http.rb:626:in `get_response'
	from C:/APP/RUBY/lib/ruby/1.6/net/http.rb:359:in `connecting'
	from C:/APP/RUBY/lib/ruby/1.6/net/http.rb:299:in `head2'
	from C:/APP/RUBY/lib/ruby/1.6/net/http.rb:340:in `do_finish'
	from C:/APP/RUBY/lib/ruby/1.6/net/protocol.rb:179:in `finish'
	from C:/APP/RUBY/lib/ruby/1.6/net/protocol.rb:172:in `start'
	from C:/APP/RUBY/lib/ruby/1.6/net/http.rb:236:in `start'
	from foo.rb:3

d:/src $ ruby -v
ruby 1.6.0 (2000-09-19) [i586-mswin32]

(For what it's worth, http.rb and protocol.rb are both version 1.1.28.)

The exception appears to occur upon closing the HTTP connection, in the
implicit finish() when Net::Protocol::start() is used as an iterator.
(The same thing happens if I call start() and finish() explicitly.)  It
appears to be attempting to close the connection with the following
line

  head2 '/', { 'Connection' => 'close' }

and failing when it doesn't receive a response.  I don't yet understand
HTTP (and protocol.rb and http.rb) enough to immediately know where
the problem lies (e.g., is it unexpected behavior to encounter EOF
upon closing a connection?).  Any pointers would be appreciated.

-- 
                 Dan Schmidt | http://www.dfan.org
Honest Bob CD now available! | http://www.dfan.org/honestbob/cd.html

In This Thread

Prev Next