libwebsockets/lib
Andy Green 909a3720c7 case insensitive http headers
Svetlin wrote on github

According to RFC2616, all header field names in both HTTP requests and HTTP responses are case-insensitive. But libwebsockets uses a case-sensitive compare.

Reproduce:
Run libwebsockets against a server that sends all of its HTTP header field names in lower-case (for example: https://github.com/extend/cowboy). libwebsockets reports an error. The expected behavior is no errors reported and a successful handshake procedure.


This changes the parser reference table in minilex to all lower case.

The code to walk the parser tables then just forces a tolower on the incoming chars.

This (and minilex tables) only applies to header names.

Reported-by: svetlin-mladnov <?@github>
Signed-off-by: Andy Green <andy.green@linaro.org>
2013-11-13 08:03:05 +08:00
..
.gitignore Ignoring linux build files 2013-01-09 15:46:11 +08:00
base64-decode.c remove bae64 decode and selftest 2013-09-18 20:57:59 +08:00
client-handshake.c make header protection unique remove __prefix 2013-10-26 20:23:00 +08:00
client-parser.c reflect send completeness in lws_write return 2013-02-23 10:50:10 +08:00
client.c make header protection unique remove __prefix 2013-10-26 20:23:00 +08:00
daemonize.c Hide private library symbols 2013-03-30 09:52:21 +08:00
extension-deflate-frame.c style cleanup 2013-02-11 17:13:32 +08:00
extension-deflate-frame.h Separate compression levels for server and client, 2013-01-10 12:45:54 +08:00
extension-deflate-stream.c style cleanup 2013-02-11 17:13:32 +08:00
extension-deflate-stream.h remove fixed rx buffer allow definition per protocol 2013-02-08 13:16:07 +08:00
extension.c Hide private library symbols 2013-03-30 09:52:21 +08:00
getifaddrs.c style cleanup 2013-02-11 17:13:32 +08:00
getifaddrs.h make header protection unique remove __prefix 2013-10-26 20:23:00 +08:00
handshake.c real http status codes update attack.sh 2013-11-11 07:30:33 +08:00
lextable.h case insensitive http headers 2013-11-13 08:03:05 +08:00
libwebsockets.c real http status codes update attack.sh 2013-11-11 07:30:33 +08:00
libwebsockets.h introduce uri args 2013-11-13 07:45:17 +08:00
minilex.c case insensitive http headers 2013-11-13 08:03:05 +08:00
output.c real http status codes update attack.sh 2013-11-11 07:30:33 +08:00
parsers.c case insensitive http headers 2013-11-13 08:03:05 +08:00
private-libwebsockets.h introduce uri args 2013-11-13 07:45:17 +08:00
server-handshake.c reflect send completeness in lws_write return 2013-02-23 10:50:10 +08:00
server.c real http status codes update attack.sh 2013-11-11 07:30:33 +08:00
sha-1.c Support _WIN32 in addition to WIN32 define 2013-11-04 10:04:31 +08:00