tolower remove
authorAndy Green <andy.green@linaro.org>
Tue, 19 Jan 2016 23:55:41 +0000 (07:55 +0800)
committerAndy Green <andy.green@linaro.org>
Tue, 19 Jan 2016 23:55:41 +0000 (07:55 +0800)
https://github.com/warmcat/libwebsockets/issues/403

Signed-off-by: Andy Green <andy.green@linaro.org>
lib/parsers.c

index 67a809c..d1e84ac 100644 (file)
@@ -29,7 +29,8 @@ unsigned char lextable[] = {
 
 int lextable_decode(int pos, char c)
 {
-       c = tolower(c);
+       if (c >= 'A' && c <= 'Z')
+               c += 'a' - 'A';
 
        while (1) {
                if (lextable[pos] & (1 << 7)) { /* 1-byte, fail on mismatch */