git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5101 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
493d66b832
commit
670d96dc3e
1 changed files with 6 additions and 2 deletions
|
@ -3871,6 +3871,7 @@ qboolean FTENET_TCP_ParseHTTPRequest(ftenet_tcpconnect_connection_t *con, ftenet
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
qboolean fail = false;
|
||||||
char acceptkey[20*2];
|
char acceptkey[20*2];
|
||||||
unsigned char sha1digest[20];
|
unsigned char sha1digest[20];
|
||||||
char *blurgh;
|
char *blurgh;
|
||||||
|
@ -3910,12 +3911,12 @@ qboolean FTENET_TCP_ParseHTTPRequest(ftenet_tcpconnect_connection_t *con, ftenet
|
||||||
case TCPC_WEBSOCKETU:
|
case TCPC_WEBSOCKETU:
|
||||||
case TCPC_WEBSOCKETB:
|
case TCPC_WEBSOCKETB:
|
||||||
if (!net_enable_websockets.ival)
|
if (!net_enable_websockets.ival)
|
||||||
return false;
|
fail = true;
|
||||||
break;
|
break;
|
||||||
case TCPC_WEBRTC_HOST:
|
case TCPC_WEBRTC_HOST:
|
||||||
case TCPC_WEBRTC_CLIENT:
|
case TCPC_WEBRTC_CLIENT:
|
||||||
if (!net_enable_webrtcbroker.ival)
|
if (!net_enable_webrtcbroker.ival)
|
||||||
return false;
|
fail = true;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
|
@ -3931,6 +3932,9 @@ qboolean FTENET_TCP_ParseHTTPRequest(ftenet_tcpconnect_connection_t *con, ftenet
|
||||||
fail = true;
|
fail = true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (fail)
|
||||||
|
return false;
|
||||||
|
|
||||||
resp = va( "HTTP/1.1 101 WebSocket Protocol Handshake\r\n"
|
resp = va( "HTTP/1.1 101 WebSocket Protocol Handshake\r\n"
|
||||||
"Upgrade: websocket\r\n"
|
"Upgrade: websocket\r\n"
|
||||||
"Connection: Upgrade\r\n"
|
"Connection: Upgrade\r\n"
|
||||||
|
|
Loading…
Reference in a new issue