<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    When latest Kamailio git master sends a message over WebSocket
    (specifically an MSRP reply on my test system) I get the error,<br>
    <blockquote>
      <pre>One or more reserved bits are on: reserved1 = 1, reserved2 = 0, reserved3 = 0</pre>
    </blockquote>
    in Google Chrome.  This happens for WebSockets over TCP and
    WebSockets over TLS.  It doesn't happen with a build of Kamailio git
    master from around two weeks ago.<br>
    <br>
    Have there been any changes in the network code over the last couple
    of weeks that might have had an effect on what Kamailio puts out on
    the wire for TCP and TLS?<br>
    <br>
    The code to send an MSRP reply over WebSocket is in
    modules/msrp/msrp_netio.c:msrp_reply()<br>
    <pre>        if (unlikely((env->srcinfo.proto == PROTO_WS
                        || env->srcinfo.proto == PROTO_WSS)
                        && sr_event_enabled(SREV_TCP_WS_FRAME_OUT))) {
                struct tcp_connection *con = tcpconn_get(env->srcinfo.id, 0, 0,
                                                                0, 0);
                ws_event_info_t wsev;

                if (con == NULL)
                {
                        LM_WARN("TCP/TLS connection for WebSocket could not be"
                                "found\n");
                        return -1;
                }

                memset(&wsev, 0, sizeof(ws_event_info_t));
                wsev.type = SREV_TCP_WS_FRAME_OUT;
                wsev.buf = rplbuf;
                wsev.len = p - rplbuf;
                wsev.id = con->id;
                return sr_event_exec(SREV_TCP_WS_FRAME_OUT, (void *) &wsev);
        }</pre>
    <br>
    The code that handles the SREV_TCP_WS_FRAME_OUT event is in
    modules/websocket/ws_frame.c and basically involves:<br>
    <ul>
      <li>filling in the WebSocket message header<br>
      </li>
      <li>identifying the correct TCP/TLS connection</li>
      <li>setting some flags (for example, SND_F_FORCE_CON_REUSE)</li>
      <li>calling tcp_send()</li>
    </ul>
    <p>These areas of the code haven't been changed for months.<br>
    </p>
    <p>Regards,<br>
    </p>
    <p>Peter<br>
    </p>
    <br>
  </body>
</html>