aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authoru0u0 <lkncastle@gmail.com>2013-10-25 17:13:11 +0800
committerAndy Green <andy.green@linaro.org>2013-10-25 22:17:21 +0800
commit44e260e004a414cd7d1ec3f36cc6bd4f25cdfdae (patch)
tree19af359b22877b1a7aab9c1f10e286efc74bfcf2 /lib
parent36efd82da6d6530983fe5a47779cfba44b547188 (diff)
downloadlibwebsockets-44e260e004a414cd7d1ec3f36cc6bd4f25cdfdae.tar.gz
fix origin
And fix client header of Origin, add prefix "http://" to make a valid URI, to make golang websocket server happy.
Diffstat (limited to 'lib')
-rw-r--r--lib/client.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/client.c b/lib/client.c
index 838dbf5f..c81f6413 100644
--- a/lib/client.c
+++ b/lib/client.c
@@ -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))