Andy,
According http://www.ietf.org/rfc/rfc2616.txt HTTP character sets are identified by case-insensitive tokens.
Please replase
if (strcmp(lws_tokens[n].token, wsi->name_buffer))
continue;
to
if (stricmp(lws_tokens[n].token, wsi->name_buffer))
continue;
Oleg
Also introduce strcasecmp definition for win32
Signed-off-by: Oleg Golosovskiy <ogolosovskiy@unison.com>
#include "gettimeofday.h"
+#define strcasecmp stricmp
+
#ifdef LWS_DLL
#ifdef LWS_INTERNAL
#define LWS_EXTERN extern __declspec(dllexport)
for (n = 0; n < WSI_TOKEN_COUNT; n++) {
if (wsi->name_buffer_pos != lws_tokens[n].token_len)
continue;
- if (strcmp(lws_tokens[n].token, wsi->name_buffer))
+ if (strcasecmp(lws_tokens[n].token, wsi->name_buffer))
continue;
debug("known hdr '%s'\n", wsi->name_buffer);
wsi->parser_state = WSI_TOKEN_GET_URI + n;