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

Binary websockets frames are not supported #655

Closed
poroh opened this issue Feb 28, 2019 · 6 comments
Closed

Binary websockets frames are not supported #655

poroh opened this issue Feb 28, 2019 · 6 comments
Labels

Comments

@poroh
Copy link

poroh commented Feb 28, 2019

Describe the bug

SIP over Webscoket (https://tools.ietf.org/html/rfc7118#section-4.2) specification clearly states:

WebSocket messages can be transported in either UTF-8 text frames or
binary frames. SIP [RFC3261] allows both text and binary bodies in
SIP requests and responses. Therefore, SIP WebSocket Clients and SIP
WebSocket Servers MUST accept both text and binary frames.

But binary messages cause parse error:

no CRLF found, not a SIP message, discarded

Logs

no CRLF found, not a SIP message, discarded

To Reproduce (if possible)

n/a.

Expected behavior

Binary websocket frames (Buffer) are accepted.

Observed behavior

Binary websocket frames are ignored

Environment Information

  • Backend Server and version: cannot share - proprietary backend
  • Browser and version: Google Chrome 72.0.3626.109 (Official Build) (64-bit)

Additional context

I suppose tha parsing function parseMessage:

export function parseMessage(data: string, ua: UA): IncomingRequest | IncomingResponse | undefined {

should also accept ArrayBuffer.

@james-criscuolo
Copy link
Collaborator

We are not going to prioritize this at the moment, but would be happy to accept a Pull Request. Given that both can be passed and changed on the fly, the function should be able to accept both (as opposed to setting modes for incoming messages on the transport/parser).

@poroh
Copy link
Author

poroh commented Feb 28, 2019

This is your choice to follow or not to follow MUSTs in recommendations.

@seanbright
Copy link
Contributor

seanbright commented Feb 28, 2019

@poroh Can you provide a link to a WebRTC endpoint that is utilizing binary messages over WebSockets so we can test against it?

Edit: Ah, disregard. I see now that it is proprietary.

@poroh
Copy link
Author

poroh commented Feb 28, 2019

@seanbright I'm not sure that it would be very easy. You can try to up samples from https://github.com/NetComposer/nksip . AFAIK it also sends binary frames.

@john-e-riordan
Copy link
Collaborator

I think this may be same issue as #792 which was recently addressed.

@james-criscuolo
Copy link
Collaborator

Fixed as of 0.15.11.

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

No branches or pull requests

5 participants