Roxen.git / server / etc / modules / WebSocket.pike

version» Context lines:

Roxen.git/server/etc/modules/WebSocket.pike:237:    id->pipe = 0;       this_program::masking = masking;       mapping headers = ([    "Upgrade" : "websocket",    "Connection" : "Upgrade",    // "Sec-WebSocket-Protocol" : "chat",    ]) + extra_headers;    -  string key = id->request_headers["Sec-WebSocket-Key"] + "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"; +  string key = id->request_headers["sec-websocket-key"] + "258EAFA5-E914-47DA-95CA-C5AB0DC85B11";    key = Crypto.SHA1.hash(key);    headers["Sec-WebSocket-Accept"] = MIME.encode_base64(key);       Stdio.Buffer data = Stdio.Buffer("HTTP/1.1 101 switching protocol\r\n");    data->add(Roxen.make_http_headers(headers));    http_data_to_send = data;          stream->set_nonblocking(0, http_write_upgrade_headers, http_close);    stream->write("");   }