GauravBasu / jquery-stream

Automatically exported from code.google.com/p/jquery-stream
0 stars 0 forks source link

handleOpen is broken when the first chunk of data doesn't include all the padding #52

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. use a high-latency link to the server, or artificially delay the 
transmission of the ";" following the padding
2. send some correctly formatted messages
3. notice that the javascript client misparses the padding which causes it to 
misparse all of the messages arriving on the stream

What is the expected output? What do you see instead?

Expected: handleOpen to return false when the padding isn't completely 
received. Actual: handleOpen always returns non-false, which means it 
mistakenly assumes the padding has been received in some cases.

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

jquery-stream 1.2 on Chrome

Please provide any additional information below.

The attached patch should address the issue.

Original issue reported on code.google.com by tonygarnockjones on 25 May 2012 at 9:22

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for patch! - http://code.google.com/p/jquery-stream/source/detail?r=200

Original comment by flowersi...@gmail.com on 27 May 2012 at 12:12

GoogleCodeExporter commented 9 years ago
By the way, I recommend you use jquery-socket if you can afford to spend some 
time. This project is now effectively no longer maintained. 

Original comment by flowersi...@gmail.com on 27 May 2012 at 12:46