[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

`sysread' end of file reached `rbuf_fill' problem

Mento Ruby

12/11/2006 10:21:00 AM

when my problem is using multithreading to get some documents from www
server through net::http library. The code is as follows


Net::HTTP.start(url.host) do |http|
req = Net::HTTP::Get.new(url.path, {"User-Agent" =>
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR
1.1.4322; InfoPath.1)"})
response = http.request(req)
http.finish()
case response
when Net::HTTPSuccess
then return response.body
else
puts "Response Not Success"
return ""
end
end

I always receive errors as follows:

C:/ruby/lib/ruby/1.8/net/protocol.rb:133:in `sysread': end of file
reached (EOFE
rror)
from C:/ruby/lib/ruby/1.8/net/protocol.rb:133:in `rbuf_fill'
from C:/ruby/lib/ruby/1.8/timeout.rb:56:in `timeout'
from C:/ruby/lib/ruby/1.8/timeout.rb:76:in `timeout'
from C:/ruby/lib/ruby/1.8/net/protocol.rb:132:in `rbuf_fill'
from C:/ruby/lib/ruby/1.8/net/protocol.rb:86:in `read'
from C:/ruby/lib/ruby/1.8/net/http.rb:2229:in `read_chunked'
from C:/ruby/lib/ruby/1.8/net/http.rb:2204:in `read_body_0'
from C:/ruby/lib/ruby/1.8/net/http.rb:2170:in `read_body'

And....

c:/ruby/lib/ruby/1.8/net/http.rb:560:in `initialize': Bad file
descriptor - connect(2) (Errno::EBADF)
from c:/ruby/lib/ruby/1.8/net/http.rb:560:in `open'
from c:/ruby/lib/ruby/1.8/net/http.rb:560:in `connect'
from c:/ruby/lib/ruby/1.8/timeout.rb:48:in `timeout'
from c:/ruby/lib/ruby/1.8/timeout.rb:76:in `timeout'
from c:/ruby/lib/ruby/1.8/net/http.rb:560:in `connect'
from c:/ruby/lib/ruby/1.8/net/http.rb:553:in `do_start'
from c:/ruby/lib/ruby/1.8/net/http.rb:542:in `start'

--
Posted via http://www.ruby-....

2 Answers

bigdog

4/1/2013 2:01:00 AM

0

On Sunday, March 31, 2013 9:53:24 PM UTC-4, GOP_Decline_and_Fall wrote:
>
> >OK, you're not an eco-snob. You're a germaphobe.
>
> I just like real food occasionally.
>
> Don't knock it if you haven't tried it.

This pretty much sums up everything I think about organic food:

http://www.youtube.com/watch?v=Z...

Bill Shatzer

4/2/2013 4:25:00 AM

0

Baxter wrote:

> "JohnJohnsn" <TopCop1988@yahoo.com> wrote in message
> news:6b3f5798-f5cc-4868-b44a-cb6e105e9206@r1g2000yql.googlegroups.com...

>>The Lord put animals on this earth to be a part of the human's food
>>chain (look up "kosher" in case you don't know what that means).

> Really?! "The Lord"?!! You really think Man is different and not part of
> "the animals"?

Moreover, there are an abundance of animals (whether put here by the
Lord or otherwise) which are forbidden to be eaten.

JJ should look up "treif".

/peace and justice/