WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
112534
WebSocket should not fail the connection when blob data can't be loaded correctly.
https://bugs.webkit.org/show_bug.cgi?id=112534
Summary
WebSocket should not fail the connection when blob data can't be loaded corre...
Li Yin
Reported
2013-03-17 23:11:36 PDT
For WebSocket.send(blob) function, when blob data can't be loaded correctly(e.g. the File or Blob resource could not be found at the time the read was processed), WebSocket will fail the connection. I don't think it is friendly, maybe add console message "blob data can't be loaded correctly" should be reasonable.
Attachments
Patch
(10.78 KB, patch)
2013-03-18 01:53 PDT
,
Li Yin
buildbot
: commit-queue-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Li Yin
Comment 1
2013-03-18 01:40:25 PDT
In my mind, if the blob data can't be loaded successfully, WebSocket object add error message to console, should not fail the connection, and then fetch the next blob to send. What is your thought?
Li Yin
Comment 2
2013-03-18 01:53:11 PDT
Created
attachment 193503
[details]
Patch
Build Bot
Comment 3
2013-03-18 05:39:06 PDT
Comment on
attachment 193503
[details]
Patch
Attachment 193503
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-commit-queue.appspot.com/results/17190513
New failing tests: http/tests/websocket/tests/hybi/send-blob.html
Li Yin
Comment 4
2013-03-18 06:51:19 PDT
It seems the diff text can't be found from the output. How to get the diff text?
Takashi Toyoshima
Comment 5
2013-03-18 15:25:37 PDT
Hi Li, Adding console message sounds good. But I object to your
comment #1
. WebSocket API spec about the send operation says; If the argument is a Blob object ... snip ... if the data cannot be sent, e.g. because it would need to be buffered but the buffer is full, the user agent must close the WebSocket connection with prejudice. send method doesn't have a way to notify errors asynchronously. And the spec consistently requires to fail the connection when send operation is not succeeded. To send following data after failure make the upper layer protocol design difficult, I think.
Li Yin
Comment 6
2013-03-18 18:15:51 PDT
(In reply to
comment #5
)
> Hi Li, > Adding console message sounds good. But I object to your
comment #1
. > To send following data after failure make the upper layer protocol design difficult, I think.
After a higher consideration, I think what you said is reasonable. If we throw some packages away, it is really difficult to use the protocol. Thanks for your comments. And we can fix the console message issue, use the readable message to replace Integer value.
Li Yin
Comment 7
2013-03-22 06:21:36 PDT
The bug is invalid, sorry for the noise.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug