[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Webrick problems under Windows (and IE6 ?

George Moschovitis

2/4/2005 9:44:00 AM

Hello everyone,

I am experiencing some problems using Webrick under Windows. I have a
small web application (the no_xsl_blog example in nitro) that runs
correctly under Linux and seems to run correctly under Windows when
using Mozilla or Firefox.

However, when using IE6 I get sometimes the following error:

[2005-02-04 11:38:52] ERROR Errno::EINVAL: Invalid argument
c:/ruby/lib/ruby/1.8/webrick/httprequest.rb:325:in `gets'
c:/ruby/lib/ruby/1.8/webrick/httprequest.rb:325:in `__send__'
c:/ruby/lib/ruby/1.8/webrick/httprequest.rb:325:in `_read_data'
c:/ruby/lib/ruby/1.8/webrick/httprequest.rb:324:in `timeout'
c:/ruby/lib/ruby/1.8/timeout.rb:55:in `timeout'
c:/ruby/lib/ruby/1.8/webrick/httprequest.rb:324:in `_read_data'
c:/ruby/lib/ruby/1.8/webrick/httprequest.rb:335:in `read_line'
c:/ruby/lib/ruby/1.8/webrick/httprequest.rb:225:in
`read_request_line'
c:/ruby/lib/ruby/1.8/webrick/httprequest.rb:86:in `parse'
c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:56:in `run'
c:/ruby/lib/ruby/1.8/webrick/server.rb:155:in `start_thread'
c:/ruby/lib/ruby/1.8/webrick/server.rb:144:in `start'
c:/ruby/lib/ruby/1.8/webrick/server.rb:144:in `start_thread'
c:/ruby/lib/ruby/1.8/webrick/server.rb:94:in `start'
c:/ruby/lib/ruby/1.8/webrick/server.rb:89:in `each'
c:/ruby/lib/ruby/1.8/webrick/server.rb:89:in `start'
c:/ruby/lib/ruby/1.8/webrick/server.rb:79:in `start'
c:/ruby/lib/ruby/1.8/webrick/server.rb:79:in `start'
./conf/../../../lib/nitro/adaptors/webrick.rb:66:in `start'
./../../lib/nitro/adaptors/runner.rb:109:in `run'
./../../lib/nitro/adaptors/runner.rb:121

c:/ruby/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5:in
`requir
e__'

c:/ruby/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5:in
`requir
e'
ctl:4


I am using Ruby 1.8.2, Webrick, Windows XP SP2, IE6. Any idea what may
be causing this problem?

Thanks is advance for any help!
George

4 Answers

Florian Gross

2/4/2005 3:53:00 PM

0

George Moschovitis wrote:

> I am experiencing some problems using Webrick under Windows. I have a
> small web application (the no_xsl_blog example in nitro) that runs
> correctly under Linux and seems to run correctly under Windows when
> using Mozilla or Firefox.
>
> However, when using IE6 I get sometimes the following error:
>
> [2005-02-04 11:38:52] ERROR Errno::EINVAL: Invalid argument
> c:/ruby/lib/ruby/1.8/webrick/httprequest.rb:325:in `gets'

I think this is caused by somebody browsing the site and closing the
connection while the server is still reading. That might be caused by
going to another web site, hitting the cancel button and so on.

I've experienced this on my own WEBrick server as well and think it's
pretty harmless, but then again I'm not 100% sure about this either.

Alan Chen

2/4/2005 4:09:00 PM

0

I've seen this too and think it has to do with KeepAlive options
keeping a socket open. If the socket is still open and the browser is
closed, However, I've never set out to explicitly check out my theory,
and my latest win build of Ruby 1.8.2 (as of Dec 2004), doesn't seem to
show the error as frequently.

ruby talk

2/4/2005 7:17:00 PM

0

On Sat, 5 Feb 2005 01:10:38 +0900, Alan Chen <aero6dof@gmail.com> wrote:
> I've seen this too and think it has to do with KeepAlive options
> keeping a socket open. If the socket is still open and the browser is
> closed, However, I've never set out to explicitly check out my theory,
> and my latest win build of Ruby 1.8.2 (as of Dec 2004), doesn't seem to
> show the error as frequently.


I've seen this using both Internet Explorer 6 and wget.

With IE6 I am not closing the browser nor loading aother page. i
simply hit the WEBrick server and see the error in the WEBrick process
almost instantly. Is there something flakey in how WEBrick is reading
headers sent by wget and IE? Might both wget and IE be sending odd
headers?

I'm seeing this in WIn2k with the Ruby 1.8.2 final 1-click version.

James Britt


Kloubakov, Yura

5/11/2005 5:16:00 PM

0

Hello,

> -----Original Message-----
> From: George Moschovitis [mailto:george.moschovitis@gmail.com]
> Sent: Friday, February 04, 2005 4:46 AM
>
> Hello everyone,
>
> I am experiencing some problems using Webrick under Windows.
> I have a small web application (the no_xsl_blog example in
> nitro) that runs correctly under Linux and seems to run
> correctly under Windows when using Mozilla or Firefox.
>
> However, when using IE6 I get sometimes the following error:
>
> [2005-02-04 11:38:52] ERROR Errno::EINVAL: Invalid argument
> c:/ruby/lib/ruby/1.8/webrick/httprequest.rb:325:in `gets'
> c:/ruby/lib/ruby/1.8/webrick/httprequest.rb:325:in `__send__'
> c:/ruby/lib/ruby/1.8/webrick/httprequest.rb:325:in
> `_read_data'
> c:/ruby/lib/ruby/1.8/webrick/httprequest.rb:324:in `timeout'
> c:/ruby/lib/ruby/1.8/timeout.rb:55:in `timeout'
> c:/ruby/lib/ruby/1.8/webrick/httprequest.rb:324:in
> `_read_data'
> c:/ruby/lib/ruby/1.8/webrick/httprequest.rb:335:in `read_line'
> c:/ruby/lib/ruby/1.8/webrick/httprequest.rb:225:in
> `read_request_line'
> c:/ruby/lib/ruby/1.8/webrick/httprequest.rb:86:in `parse'
> c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:56:in `run'
> c:/ruby/lib/ruby/1.8/webrick/server.rb:155:in `start_thread'
> c:/ruby/lib/ruby/1.8/webrick/server.rb:144:in `start'
> c:/ruby/lib/ruby/1.8/webrick/server.rb:144:in `start_thread'
> c:/ruby/lib/ruby/1.8/webrick/server.rb:94:in `start'
> c:/ruby/lib/ruby/1.8/webrick/server.rb:89:in `each'
> c:/ruby/lib/ruby/1.8/webrick/server.rb:89:in `start'
> c:/ruby/lib/ruby/1.8/webrick/server.rb:79:in `start'
> c:/ruby/lib/ruby/1.8/webrick/server.rb:79:in `start'
> ./conf/../../../lib/nitro/adaptors/webrick.rb:66:in `start'
> ./../../lib/nitro/adaptors/runner.rb:109:in `run'
> ./../../lib/nitro/adaptors/runner.rb:121
>
> c:/ruby/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5:in
> `requir
> e__'
>
> c:/ruby/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5:in
> `requir
> e'
> ctl:4
>
>
> I am using Ruby 1.8.2, Webrick, Windows XP SP2, IE6. Any idea
> what may be causing this problem?
>
> Thanks is advance for any help!
> George

I am running Webrick application under Windows XP and see the same error
when connecting from IE running under Windows CE handheld computer.
There is no error when connecting from IE or Firefox running under
Windows 2000/XP or Linux. Did anybody find a solution to this problem?

It looks like application continues to run correctly but I have a feeling
that this exception slows it down.

Thanks,
Yura.