mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
ws: ext header is already delimited if present
This commit is contained in:
parent
a656eb5f1b
commit
ef4a85d0e1
1 changed files with 4 additions and 3 deletions
|
@ -737,6 +737,7 @@ handshake_0405(struct lws_context *context, struct lws *wsi)
|
|||
|
||||
LWS_CPYAPP(p, "\x0d\x0aSec-WebSocket-Protocol: ");
|
||||
p += lws_snprintf(p, 128, "%s", prot);
|
||||
LWS_CPYAPP(p, "\x0d\x0a");
|
||||
}
|
||||
|
||||
#if !defined(LWS_WITHOUT_EXTENSIONS)
|
||||
|
@ -744,13 +745,13 @@ handshake_0405(struct lws_context *context, struct lws *wsi)
|
|||
* Figure out which extensions the client has that we want to
|
||||
* enable on this connection, and give him back the list.
|
||||
*
|
||||
* Give him a limited write bugdet
|
||||
* Give him a limited write bugdet.
|
||||
*
|
||||
* This appends a closing CRLF before returning, if h1
|
||||
*/
|
||||
LWS_CPYAPP(p, "\x0d\x0a");
|
||||
if (lws_extension_server_handshake(wsi, &p, 190))
|
||||
goto bail;
|
||||
#endif
|
||||
LWS_CPYAPP(p, "\x0d\x0a");
|
||||
|
||||
args.p = p;
|
||||
args.max_len = lws_ptr_diff((char *)pt->serv_buf +
|
||||
|
|
Loading…
Add table
Reference in a new issue