mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
fix origin
And fix client header of Origin, add prefix "http://" to make a valid URI, to make golang websocket server happy.
This commit is contained in:
parent
36efd82da6
commit
44e260e004
1 changed files with 1 additions and 1 deletions
|
@ -849,7 +849,7 @@ libwebsockets_generate_client_handshake(struct libwebsocket_context *context,
|
|||
p += strlen(key_b64);
|
||||
p += sprintf(p, "\x0d\x0a");
|
||||
if (lws_hdr_simple_ptr(wsi, _WSI_TOKEN_CLIENT_ORIGIN))
|
||||
p += sprintf(p, "Origin: %s\x0d\x0a",
|
||||
p += sprintf(p, "Origin: http://%s\x0d\x0a",
|
||||
lws_hdr_simple_ptr(wsi, _WSI_TOKEN_CLIENT_ORIGIN));
|
||||
|
||||
if (lws_hdr_simple_ptr(wsi, _WSI_TOKEN_CLIENT_SENT_PROTOCOLS))
|
||||
|
|
Loading…
Add table
Reference in a new issue