From: Bob Gustafson Date: 2001-10-01T14:28:34+09:00 Subject: [ruby-talk:21857] Re: net/http problems on FreeBSD 4.4-RC >>Hi Jason, >> >> In mail "[ruby-talk:21688] net/http problems on FreeBSD 4.4-RC" >> Jason DiCioccio wrote: >> >>> I'm having the following problems with Net::HTTP on ruby 1.6.4 (and >>>1.6.5) on >>> FreeBSD 4.4-RC.. I suspect it to be a bug specific ruby on the platform >>>actually >>> since it works on my OS X box fine. >> >>> /usr/local/lib/ruby/1.6/net/protocol.rb:631:in `sysread': End of file >>>reached (EOFError) >> >>> # Fetch the requested document >>> h = Net::HTTP.new(host, port) >>> h.use_ssl = true if scheme == "https" # enable SSL/TLS >> >>Hmm... I cannot reproduce this bug on my linux box. >>For the time being, try block form #start like the code below. >> >> Net::HTTP.start(...) {|h| >> .... >> } >> >>I strongly suggest to call #start explicitly, with block, ALWAYS. >>I did not test implicit #start hardly so it might cause strange >>connection bugs. >> >>Minero Aoki Previously sent by Bob Gustafson: > >I'm having the same problem. It seemed to start up today (I installed >1.6.5 and reinstalled net-1.1.31 (which did not seem to change)) > >The line numbers are a bit different though. > >I made other changes in my calling program, so it could be my problem. The >program sample/httpget.rb in the net-1.1.31 directory seems to work ok. > >I will try the explicit #start - thanks for the clue. > >BobG > >---- my error traceback from earlier today -- > >/usr/local/lib/ruby/1.6/net/protocol.rb:551:in `sysread': End of file >reached (E >OFError) > from /usr/local/lib/ruby/1.6/net/protocol.rb:551:in `fill_rbuf' > from /usr/local/lib/ruby/1.6/net/protocol.rb:496:in `readuntil' > from /usr/local/lib/ruby/1.6/net/protocol.rb:506:in `readline' I shot myself in the foot on this one. As I said, I upgraded to 1.6.5 and then reinstalled net-1.1.31 The reinstall of net-1.1.31 was not the thing to do, as net-1.1.36 is now a part of the ruby-1.6.5 distribution - and works fine. I just re-installed ruby-1.6.5 and now am a happy camper. BobG