mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-16 00:00:07 +01:00

HTTP/2 support is now able to serve the test server, complete with
websockets, from a single vhost.
- This works the same with both OpenSSL and mbedTLS.
- POST is now wired up and works (also for file upload).
- CGI is wired up and works.
- Redirect is adapted and works
- lwsws works.
- URI urldecode, sanitation and argument parsing wired up for :path
valgrind clean (aside from openssl-style false uninit data usage in mbedtls send occasionally)
h2spec reports:
$ h2spec -h 127.0.0.1 -p 7681 -t -k -o 1
...
145 tests, 145 passed, 0 skipped, 0 failed"
Incorporates:
- "https://github.com/warmcat/libwebsockets/pull/1039
Fixes issue with -Werror=unused-variable flag
- 2c843a1395
ssl: fix infinite loop on client cert verification failure
Signed-off-by: Petar Paradzik <petar.paradzik@sartura.hr>"
Caused and fixes Coverity 184887 - 184892
104 lines
1.7 KiB
C
104 lines
1.7 KiB
C
/* set of parsable strings -- ALL LOWER CASE */
|
|
|
|
#if !defined(STORE_IN_ROM)
|
|
#define STORE_IN_ROM
|
|
#endif
|
|
|
|
STORE_IN_ROM static const char * const set[] = {
|
|
"get ",
|
|
"post ",
|
|
"options ",
|
|
"host:",
|
|
"connection:",
|
|
"upgrade:",
|
|
"origin:",
|
|
"sec-websocket-draft:",
|
|
"\x0d\x0a",
|
|
|
|
"sec-websocket-extensions:",
|
|
"sec-websocket-key1:",
|
|
"sec-websocket-key2:",
|
|
"sec-websocket-protocol:",
|
|
|
|
"sec-websocket-accept:",
|
|
"sec-websocket-nonce:",
|
|
"http/1.1 ",
|
|
"http2-settings:",
|
|
|
|
"accept:",
|
|
"access-control-request-headers:",
|
|
"if-modified-since:",
|
|
"if-none-match:",
|
|
"accept-encoding:",
|
|
"accept-language:",
|
|
"pragma:",
|
|
"cache-control:",
|
|
"authorization:",
|
|
"cookie:",
|
|
"content-length:",
|
|
"content-type:",
|
|
"date:",
|
|
"range:",
|
|
"referer:",
|
|
"sec-websocket-key:",
|
|
"sec-websocket-version:",
|
|
"sec-websocket-origin:",
|
|
|
|
":authority",
|
|
":method",
|
|
":path",
|
|
":scheme",
|
|
":status",
|
|
|
|
"accept-charset:",
|
|
"accept-ranges:",
|
|
"access-control-allow-origin:",
|
|
"age:",
|
|
"allow:",
|
|
"content-disposition:",
|
|
"content-encoding:",
|
|
"content-language:",
|
|
"content-location:",
|
|
"content-range:",
|
|
"etag:",
|
|
"expect:",
|
|
"expires:",
|
|
"from:",
|
|
"if-match:",
|
|
"if-range:",
|
|
"if-unmodified-since:",
|
|
"last-modified:",
|
|
"link:",
|
|
"location:",
|
|
"max-forwards:",
|
|
"proxy-authenticate:",
|
|
"proxy-authorization:",
|
|
"refresh:",
|
|
"retry-after:",
|
|
"server:",
|
|
"set-cookie:",
|
|
"strict-transport-security:",
|
|
"transfer-encoding:",
|
|
"user-agent:",
|
|
"vary:",
|
|
"via:",
|
|
"www-authenticate:",
|
|
|
|
"patch",
|
|
"put",
|
|
"delete",
|
|
|
|
"uri-args", /* fake header used for uri-only storage */
|
|
|
|
"proxy ",
|
|
"x-real-ip:",
|
|
"http/1.0 ",
|
|
|
|
"x-forwarded-for",
|
|
"connect ",
|
|
"head ",
|
|
"te:", /* http/2 wants it to reject it */
|
|
|
|
"", /* not matchable */
|
|
|
|
};
|