Bug 85961
| Summary: | XHR/WebSocket: send(ArrayBuffer) -> send(ArrayBufferView) | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Yuta Kitamura <yutak> |
| Component: | XML | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | ap, bashi, ian, kbr, toyoshim, tyoshino |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | All | ||
| OS: | All | ||
| Bug Depends on: | 90536, 90877 | ||
| Bug Blocks: | |||
Yuta Kitamura
Recently, annevk and hixie have changed XHR/WebSocket spec so {XMLHttpRequest,WebSocket}.send() could accept ArrayBufferView instead of ArrayBuffer:
http://dvcs.w3.org/hg/xhr/rev/f0c81ac5c134 (XHR spec change)
http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#the-send()-method (XHR latest spec)
http://html5.org/tools/web-apps-tracker?from=7084&to=7085 (WebSocket spec change)
http://dev.w3.org/html5/websockets/#dom-websocket-send (WebSocket latest spec)
Related discussion:
http://lists.w3.org/Archives/Public/public-webapps/2012AprJun/0141.html
However, this change yields compatibility breakage (i.e. existing code using send(ArrayBuffer) will no longer work), so we might want to discuss how to deal with it before implementing it.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Ian 'Hixie' Hickson
The spec was updated to allow both ArrayBuffer and ArrayBufferView to be sent in WebSocket.
The XHR spec has moved to http://xhr.spec.whatwg.org/ but still only has ArrayBufferView.
Takeshi Yoshino
WebSocket spec:
As Hixie said, we added ArrayBufferView but also kept ArrayBuffer basically for compatibility.
https://www.w3.org/Bugs/Public/show_bug.cgi?id=17263
http://dev.w3.org/html5/websockets/
WebSocket WebCore implementation:
It conforms to the latest spec, i.e. both ArrayBuffer and ArrayBufferView
https://bugs.webkit.org/show_bug.cgi?id=90877
http://trac.webkit.org/browser/trunk/Source/WebCore/Modules/websockets/WebSocket.idl?rev=124846
XHR:
Seems there's no active discussion after dropping ArrayBuffer and adding ArrayBufferView.
As it's a matter of spec discussion, it's ok to close this bug for now, I think.
http://lists.w3.org/Archives/Public/public-webapps/2012AprJun/0214.html
Simon's summary of conclusion.
https://www.w3.org/Bugs/Public/show_bug.cgi?id=16732