SergejJurecko / mio_httpc

mio based async and sync http client
Apache License 2.0
46 stars 10 forks source link

A control frame following a non-fin text / binary frame? #20

Closed helinwang closed 5 years ago

helinwang commented 5 years ago

I might be wrong, since I am just looking at the code: https://github.com/SergejJurecko/mio_httpc/blob/master/src/api/websocket.rs#L465-L481

Seems when a control frame following a non-fin text / binary frame, the code treats the control frame as a text or binary frame. Which seems to be incorrect.

RFC 6455 says:

o Control frames (see Section 5.5) MAY be injected in the middle of a fragmented message. Control frames themselves MUST NOT be fragmented.

https://tools.ietf.org/html/rfc6455#section-5.2

SergejJurecko commented 5 years ago

You are right. Thank you.

SergejJurecko commented 5 years ago

New bugfix version published