korimo / firewatir

Automatically exported from code.google.com/p/firewatir
0 stars 0 forks source link

browser.html get hangup because contaoner.read_socket() try to get incorrect number of bytes #74

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Open one html page that is 1025 bytes long
2. The read_socket() will read 1024 bytes at a time, and look at if the
last 4 characters are: "/n> ", if those characters get broken into 2 reads,
it will try to read another 1024 bytes, and program hangup.

Email me for one test html page.

Fix:

Firewatir 1.1.1
container.rb:

add one line:

# new line:
 break if return_value[return_value.length - 3..return_value.length - 1] ==
"\n> "

# this line get hang up
data = stream.recv(1024)

What version of the product are you using? On what operating system?
1.1.1

Please provide any additional information below.
for specific test case, please email me at:
chen at foreopen.com

Because of client confientiality, I can not post the test case to the web.
  I will give to you if you drop me one email. This problem does cause
Firewatir to hangup 4 out of each 1024 times, if it hits a strange length
html file.

~Andrew Chen

Original issue reported on code.google.com by hang...@gmail.com on 6 Jul 2008 at 11:56

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by ang...@gmail.com on 7 Jul 2008 at 6:15

GoogleCodeExporter commented 9 years ago
Even after this fix, the firewatir still hangup.

Please look at the read_socket code in container.rb, I think that is where it 
hang up.

What is the correct condition to know the end of stream from jssh ?

~Andrew Chen

Original comment by hang...@gmail.com on 7 Jul 2008 at 3:55

GoogleCodeExporter commented 9 years ago

Original comment by ang...@gmail.com on 29 Jul 2008 at 9:07

GoogleCodeExporter commented 9 years ago

Original comment by ang...@gmail.com on 29 Jul 2008 at 9:19