1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

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 <pavel.borzenkov@auriga.com>
This commit is contained in:
Pavel Borzenkov 2011-04-12 09:47:50 +01:00 committed by Andy Green
parent 26111bc4c6
commit 2af39964dc

View file

@ -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)