Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

js blob type #25

Open
gertcuykens opened this issue Aug 19, 2012 · 2 comments
Open

js blob type #25

gertcuykens opened this issue Aug 19, 2012 · 2 comments

Comments

@gertcuykens
Copy link
Contributor

Is there room for a js blob type in the rfc?
m.data.type is always empty when receiving messages.

ws.binaryType = 'blob'
ws.onmessage = function(m){
    console.log(m.data.type)
}
var b=new Blob(['Hello world.'],{"type":"text/plain"})
console.log(b.type)
ws.send(b)
loop :: WS.WebSockets WS.Hybi10 ()
loop = flip WS.catchWsError catchDisconnect $ do
    msg <- WS.receiveData
    WS.sendBinaryData (msg::B.ByteString)
    loop
@jaspervdj
Copy link
Owner

I'm not sure if this is supposed to work. Blob types aren't mentioned in the RFC (although they are in the WebSockets JS API by W3), and I don't really think this is an issue on the server side. I've tested it with some other servers and they all show this behavior...

@gertcuykens
Copy link
Contributor Author

Can you make a blob type comment in the rfc pleas so browsers will implement this in the future :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants