vbmithr / ocaml-websocket

Websocket library for OCaml
ISC License
161 stars 44 forks source link

Remove random_string argument from server #89

Closed copy closed 7 years ago

copy commented 7 years ago

Servers never mask their frames, and therefore never call random_string. We can remove this argument.

@vbmithr Is this assumption correct? If so, I can make a PR.

vbmithr commented 7 years ago

Yes, correct. From the RFC:

A server MUST NOT mask any frames that it sends to
   the client.  A client MUST close a connection if it detects a masked
   frame.  In this case, it MAY use the status code 1002 (protocol
   error) as defined in Section 7.4.1.  (These rules might be relaxed in
   a future specification.)

I'll fix this, thanks.

copy commented 7 years ago

I'll fix this, thanks.

Will you, or should I?

vbmithr commented 7 years ago

Fixed via 17aad282c9077f6df0dd44d7a62048d2d5b55dcd.