From 2af39964dcb270b19e809b9e03f11aa2c2365cd3 Mon Sep 17 00:00:00 2001 From: Pavel Borzenkov Date: Tue, 12 Apr 2011 09:47:50 +0100 Subject: [PATCH] HTTP headers may be case-sensitive For the IETF revision 00 send 'Upgrade: WebSocket' header instead of 'Upgrade: websocket' as described in the IETF standard. Some servers (for example, phpdaemon) are case-sensitive. Signed-off-by: Pavel Borzenkov --- lib/libwebsockets.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libwebsockets.c b/lib/libwebsockets.c index 6a0ef37f..1f024a68 100644 --- a/lib/libwebsockets.c +++ b/lib/libwebsockets.c @@ -1180,7 +1180,7 @@ libwebsocket_service_fd(struct libwebsocket_context *context, libwebsockets_00_spaceout(key_1, spaces_1, seed); libwebsockets_00_spaceout(key_2, spaces_2, seed >> 16); - p += sprintf(p, "Upgrade: websocket\x0d\x0a" + p += sprintf(p, "Upgrade: WebSocket\x0d\x0a" "Connection: Upgrade\x0d\x0aHost: %s\x0d\x0a", wsi->c_host); if (wsi->c_origin)