[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Net::HTTP.get2 failure when using debugger

jnjortn@gmail.com

11/1/2006 10:24:00 PM

Hi,
Can someone tell me if I have found a bug or am doing something wrong
using Net::HTTP.get ? If I run the code without the -rdebug flag, then
it works perfectly. If I use the flag and then simply do a continue,
then I get the errors shown after the code below. I have stepped
through the code and shown that it is the get2 call that causes the
error. Also happens with the get method.

Jeff


#!/usr/bin/ruby

require 'net/http'

SITE = "http://campus.acm...
PATH = '/Public/fmr/'
USERAGENT = ' Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en)
AppleWebKit/418.9 (KHTML, like Gecko) Safari/419.3'
http = Net::HTTP.new('campus.acm.org',80)
puts " "
puts "First Get"
headers = {
'Content-type' => 'application/x-www-form-urlencoded',
'User-Agent' => USERAGENT,
'Keep-Alive' => '300',
'Connection' => 'keep-alive'
}
resp, data = http.get2(PATH, headers)
puts 'Code= ' + resp.code


---------------
spartan[293]ruby -rdebug jtest1.rb
Debug.rb
Emacs support available.

jtest1.rb:3:require 'net/http'
(rdb:1) c

First Get
/usr/local/lib/ruby/1.8/net/protocol.rb:133: `end of file reached'
(EOFError)
from /usr/local/lib/ruby/1.8/timeout.rb:76:in `timeout'
from /usr/local/lib/ruby/1.8/net/protocol.rb:132:in `rbuf_fill'
from /usr/local/lib/ruby/1.8/net/protocol.rb:104:in `read_all'
from /usr/local/lib/ruby/1.8/net/http.rb:2217:in `read_body_0'
from /usr/local/lib/ruby/1.8/net/http.rb:2170:in `read_body'
from /usr/local/lib/ruby/1.8/net/http.rb:2195:in `body'
from /usr/local/lib/ruby/1.8/net/http.rb:2134:in `reading_body'
from /usr/local/lib/ruby/1.8/net/http.rb:1049:in `request'
from /usr/local/lib/ruby/1.8/net/http.rb:1034:in `request'
from /usr/local/lib/ruby/1.8/net/http.rb:543:in `start'
from /usr/local/lib/ruby/1.8/net/http.rb:1032:in `request'
from /usr/local/lib/ruby/1.8/net/http.rb:945:in `get2'
from jtest1.rb:17
/usr/local/lib/ruby/1.8/net/protocol.rb:133: @rbuf <<
@io.sysread(1024)

7 Answers

Jack Linthicum

11/22/2008 2:04:00 PM

0

On Nov 22, 8:11 am, !Jones' Sock Puppet <h...@there.org> wrote:
> On Sat, 22 Nov 2008 04:53:50 -0800 (PST), in alt.war.vietnam Jack
>
> Linthicum <jacklinthi...@earthlink.net> wrote:
> >Does anyone know what the actual working conditions of UAW workers at
> >Big 3 plants are? I have read some 1950s studies where the UAW was
> >trying to get a 30-40 plan, 30 hours of work for 40 hours of pay. Also
> >seven paid sick days if you worked that 30 hours a week.
>
> Having unions in complete control is like having a single party
> president and fillabuster-proof majorities.  The unions have served
> their purpose; however, when they come to dominance, they vote
> themselves too many pay raises.  Witness: what used to be the US steel
> industry.  They had a strong union in the early '70s and became the
> world's most highly-paid, unemployed steel workers.  OTOH, there are
> good reasons for unions' existence.
>
> Jones

I don't think that addresses my question

Jack Linthicum

11/22/2008 8:11:00 PM

0

On Nov 22, 2:41 pm, !Jones' Sock Puppet <h...@there.org> wrote:
> On Sat, 22 Nov 2008 06:03:54 -0800 (PST), in alt.war.vietnam Jack
>
> Linthicum <jacklinthi...@earthlink.net> wrote:
> >I don't think that addresses my question.
>
> I agree.  Get over it.
>
> The simple fact that you post a question to Usenet does not obligate
> me or anyone else to provide you with an answer.
>
> It was just a perfectly civil comment.
>
> Jones

No it wasn't. And if you attach your snort to my post you are replying
to me. Any fool, but you, would know that.

Don T.

11/22/2008 8:31:00 PM

0

"Jacks Off and Licks-up-cum" <jack-licks-cum@earthlink.net> spewed in
message
news:4b1c3ffd-2dfe-4de2-a991-ca02ea12267c@f20g2000yqg.googlegroups.com...
On Nov 22, 2:41 pm, !Jones' Sock Puppet <h...@there.org> wrote:
> On Sat, 22 Nov 2008 06:03:54 -0800 (PST), in alt.war.vietnam Jack
>
> Linthicum <jacklinthi...@earthlink.net> wrote:
> >I don't think that addresses my question.
>
> I agree. Get over it.
>
> The simple fact that you post a question to Usenet does not obligate
> me or anyone else to provide you with an answer.
>
> It was just a perfectly civil comment.
>
> Jones

No it wasn't. And if you attach your snort to my post you are replying
to me. Any fool, but you, would know that.

===================================================

Any fool but -you- would know that just because you ask a question on
Usenet does not mean you are entitled to an answer.

--


Don Thompson

Stolen from Dan: "Just thinking, besides, I watched 2 dogs mating once,
and that makes me an expert. "

There is nothing more frightening than active ignorance.
~Goethe

It is a worthy thing to fight for one's freedom;
it is another sight finer to fight for another man's.
~Mark Twain


Jack Linthicum

11/22/2008 8:34:00 PM

0

On Nov 22, 3:30 pm, "Don T." <-paint...@louvre.org> wrote:
> "Jacks Off and Licks-up-cum" <jack-licks-...@earthlink.net> spewed in
> messagenews:4b1c3ffd-2dfe-4de2-a991-ca02ea12267c@f20g2000yqg.googlegroups..com...
> On Nov 22, 2:41 pm, !Jones' Sock Puppet <h...@there.org> wrote:
>
> > On Sat, 22 Nov 2008 06:03:54 -0800 (PST), in alt.war.vietnam Jack
>
> > Linthicum <jacklinthi...@earthlink.net> wrote:
> > >I don't think that addresses my question.
>
> > I agree. Get over it.
>
> > The simple fact that you post a question to Usenet does not obligate
> > me or anyone else to provide you with an answer.
>
> > It was just a perfectly civil comment.
>
> > Jones
>
> No it wasn't. And if you attach your snort to my post you are replying
> to me. Any fool, but you, would know that.
>
> ===================================================
>
>  Any fool but  -you-  would know that just because you ask a question on
> Usenet does not mean you are entitled to an answer.
>
> --
>
> Don Thompson
>
> Stolen from Dan:  "Just thinking, besides, I watched 2 dogs mating once,
> and that makes me an expert. "
>
> There is nothing more frightening than active ignorance.
> ~Goethe
>
> It is a worthy thing to fight for one's freedom;
> it is another sight finer to fight for another man's.
> ~Mark Twain

No, that's true, but if someone does attach a statement to my post I
think it is reasonable that it is in relation to my question.
Otherwise, you are just replicating Hines and his random replies to
questions not asked.

Jack Linthicum

11/22/2008 11:01:00 PM

0

On Nov 22, 5:34 pm, !Jones' Sock Puppet <h...@there.org> wrote:
> On Sat, 22 Nov 2008 12:33:31 -0800 (PST), in alt.war.vietnam Jack
>
> Linthicum <jacklinthi...@earthlink.net> wrote:
> >>  Any fool but  -you-  would know that just because you ask a question on
> >> Usenet does not mean you are entitled to an answer.
>
> >No, that's true, but if someone does attach a statement to my post I
> >think it is reasonable that it is in relation to my question.
> >Otherwise, you are just replicating Hines and his random replies to
> >questions not asked.
>
> But, if you want an answer to a question about unions, then post it to
> an appropriate group... at the very least, don't start whining that
> the reply was off-topic when you post a question about labor unions in
> the United States to a British history group.  You are behaving
> illogically.
>
> Jones (actually, I'm his sock puppet; Jones is the guy with his hand
> up my ass.)

It was in a Naval Group, check it out.

Jack Linthicum

11/22/2008 11:02:00 PM

0

On Nov 22, 5:28 pm, !Jones' Sock Puppet <h...@there.org> wrote:
> On Sat, 22 Nov 2008 12:10:39 -0800 (PST), in alt.war.vietnam Jack
>
> Linthicum <jacklinthi...@earthlink.net> wrote:
> >> The simple fact that you post a question to Usenet does not obligate
> >> me or anyone else to provide you with an answer.
>
> >> It was just a perfectly civil comment.
>
> >No it wasn't. And if you attach your snort to my post you are replying
> >to me. Any fool, but you, would know that.
>
> Let me see if I have this straight: you post some question about union
> pay and working conditions in Detroit to a British history group
> (alt.history.british), a Vietnam War veterans' group
> (alt.war.vietnam), a naval history group (sci.military.naval), a
> medieval history group (soc.history.medieval???), and, last, but not
> least, a United States Army newsgroup (us.military.army)... and then
> you whine because the reply you received didn't perfectly address your
> question!  Am I reading this correctly?
>
> Why did you think that someone reading the Vietnam veterans' group
> would be the best person to ask?  Why on this green earth would you
> post that question to a medieval history group?  Man, that utterly
> defies logic!
>
> May I suggest that it would make far more sense to post that question
> to alt.society.labor-unions or alt.detroit.labor-unions.  I don't
> flame at people for being off-topic; however, posting it here and then
> complaining that your answers are off-topic *really* takes balls, pal!
>
> Jones

May I ask why you think it was posted to those groups? I posted it
from Sci.military.naval. What other addresses think they have to
participate is moot. You are a truly a sock puppet for Hines and his
multiple addresses.

Don T.

11/22/2008 11:11:00 PM

0

"Jacks off and Licks-up-cum" <jack-licks-cum@earthlink.net> told the entire
world how stupid he is in message
news:a7bc735c-ee51-4b31-ba9f-5345c994e039@a12g2000yqm.googlegroups.com...
On Nov 22, 5:28 pm, !Jones' Sock Puppet <h...@there.org> wrote:
> On Sat, 22 Nov 2008 12:10:39 -0800 (PST), in alt.war.vietnam Jack
>
> Linthicum <jacklinthi...@earthlink.net> wrote:
> >> The simple fact that you post a question to Usenet does not obligate
> >> me or anyone else to provide you with an answer.
>
> >> It was just a perfectly civil comment.
>
> >No it wasn't. And if you attach your snort to my post you are replying
> >to me. Any fool, but you, would know that.
>
> Let me see if I have this straight: you post some question about union
> pay and working conditions in Detroit to a British history group
> (alt.history.british), a Vietnam War veterans' group
> (alt.war.vietnam), a naval history group (sci.military.naval), a
> medieval history group (soc.history.medieval???), and, last, but not
> least, a United States Army newsgroup (us.military.army)... and then
> you whine because the reply you received didn't perfectly address your
> question! Am I reading this correctly?
>
> Why did you think that someone reading the Vietnam veterans' group
> would be the best person to ask? Why on this green earth would you
> post that question to a medieval history group? Man, that utterly
> defies logic!
>
> May I suggest that it would make far more sense to post that question
> to alt.society.labor-unions or alt.detroit.labor-unions. I don't
> flame at people for being off-topic; however, posting it here and then
> complaining that your answers are off-topic *really* takes balls, pal!
>
> Jones

May I ask why you think it was posted to those groups? I posted it
from Sci.military.naval. What other addresses think they have to
participate is moot. You are a truly a sock puppet for Hines and his
multiple addresses.
=========================================
Jesus H. Motherfucking Keerist. You are posting TO the following goddamn
groups:

alt.history.british,alt.war.vietnam,sci.military.naval,soc.history.medieval,us.military.army



You are one piss-ignorant sack of shit.



Path:
border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!a12g2000yqm.googlegroups.com!not-for-mail
From: Jack Linthicum <jacklinthicum@earthlink.net>
Newsgroups:
alt.history.british,alt.war.vietnam,sci.military.naval,soc.history.medieval,us.military.army
Subject: Re: Detroit Autos Defunct?
Date: Sat, 22 Nov 2008 15:01:43 -0800 (PST)
Organization: http://groups....
Lines: 37
Message-ID:
<a7bc735c-ee51-4b31-ba9f-5345c994e039@a12g2000yqm.googlegroups.com>
References: <bosVk.206$9k5.341@eagle.america.net>
<d41f613f-aec6-4d30-afdb-8dd0e27e7f53@y18g2000yqn.googlegroups.com>
<kk0gi45g6lm57m6h1gqhfclmrqp6q9bqg2@4ax.com>
<b891b705-e060-4a28-ba48-8a618197c3a0@k36g2000yqe.googlegroups.com>
<gvngi41jasper5t6pi7rlgqjt9ev9kdi01@4ax.com>
<4b1c3ffd-2dfe-4de2-a991-ca02ea12267c@f20g2000yqg.googlegroups.com>
<av0hi4ha5u0nqr885k2o00l3ftu4d8a95g@4ax.com>
NNTP-Posting-Host: 72.40.3.148
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1227394903 4097 127.0.0.1 (22 Nov 2008 23:01:43
GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Sat, 22 Nov 2008 23:01:43 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: a12g2000yqm.googlegroups.com; posting-host=72.40.3.148;
posting-account=xtUkLgkAAACOhuoYOJtB4pk1TADupWiX
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
rv:1.9.0.4)
Gecko/2008102920 Firefox/3.0.4,gzip(gfe),gzip(gfe)
Bytes: 3468
Xref: number1.nntp.dca.giganews.com alt.history.british:345812
alt.war.vietnam:732470 sci.military.naval:943930 soc.history.medieval:589345
us.military.army:781821




--


Don Thompson

Stolen from Dan: "Just thinking, besides, I watched 2 dogs mating once,
and that makes me an expert. "

There is nothing more frightening than active ignorance.
~Goethe

It is a worthy thing to fight for one's freedom;
it is another sight finer to fight for another man's.
~Mark Twain