libwebsockets/lib
Andrew Canaday afe26cf4a6 HTTP Version, Keep-alive support, No-copy POST
This is a squashed commit from https://github.com/andrew-canaday/libwebsockets,
dev/http_keepalive branch (strategies changed a few times, so the commit
history is clutteread). This branch is submitted for clarity, but the other
can be used as a reference or alternative.

 * added **enum http_version** to track HTTP/1.0 vs HTTP/1.1 requests
 * added **enum http_connection_type** to track keep-alive vs close
 * replaced content_length_seen and body_index with **content_remain**
 * removed **post_buffer** (see handshake.c modifications)

 * removed post_buffer free

 * switch state to WSI_TOKEN_SKIPPING after URI is complete to store version
 * delete *spill* label (unused)

 * add vars to track HTTP version and connection type
 * HTTP version defaults to 1.0
 * connection type defaults to 'close' for 1.0, keep-alive for 1.1
 * additional checks in **cleanup:** label:
   * if HTTP version string is present and valid, set enum val appropriately
   * override connection default with the "Connection:" header, if present
 * set state to WSI_STATE_HTTP_BODY if content_length > 0
 * return 0 on HTTP requests, unless LWS_CALLBACK_HTTP indicates otherwise

 * add vars to track remaining content_length and body chunk size
 * re-arrange switch case order to facilitate creation of jump-table
 * added new labels:
   * **read_ok**: normal location reach on break from switch; just return 0
   * **http_complete**: check for keep-alive + init state, mode, hdr table
   * **http_new**: jump location for keep-alive when http_complete sees len>0
 * after libwebsocket_parse, jump to one of those labels based on state
 * POST body handling:
   * don't bother iterating over input byte-by-byte or using memcpy
   * just pass the relevant portion of the context->service_buffer to callback
2014-07-14 20:19:43 +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 dont free externally allocated user_space when closing connection 2014-07-06 09:36:43 +08:00
client-parser.c refactor out most NO_EXTENSIONS 2014-04-02 19:45:42 +08:00
client.c Added optional per-header length limits: 2014-07-06 09:33:40 +08:00
context.c Added optional per-header length limits: 2014-07-06 09:33:40 +08:00
daemonize.c Hide private library symbols 2013-03-30 09:52:21 +08:00
extension-deflate-frame.c client allow user callback to close on nonzero return 2014-03-15 09:32:40 +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 partial send handling 2014-07-06 09:36:44 +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 HTTP Version, Keep-alive support, No-copy POST 2014-07-14 20:19:43 +08:00
lextable.h Added HTTP OPTIONS support: 2014-07-06 09:36:43 +08:00
libev.c refactor move ssl server service to ssl.c 2014-04-12 10:07:02 +08:00
libwebsockets.c HTTP Version, Keep-alive support, No-copy POST 2014-07-14 20:19:43 +08:00
libwebsockets.h add runtime context flag to enforce defeat of OS CA CERTS even if build option selected 2014-07-06 09:36:44 +08:00
lws-plat-unix.c fix build on OpenBSD 2014-07-06 09:36:43 +08:00
lws-plat-win.c Windows: Fix implementation of lws_plat_inet_ntop() 2014-04-15 18:45:48 +02:00
minilex.c Added HTTP OPTIONS support: 2014-07-06 09:36:43 +08:00
output.c fixes for close flush 2014-04-10 17:06:59 +08:00
parsers.c HTTP Version, Keep-alive support, No-copy POST 2014-07-14 20:19:43 +08:00
pollfd.c refactor libev eliminate all code ifdefs 2014-04-11 13:14:37 +08:00
private-libwebsockets.h HTTP Version, Keep-alive support, No-copy POST 2014-07-14 20:19:43 +08:00
server-handshake.c fixup no extentsion around last clean 2014-04-10 15:15:13 +08:00
server.c HTTP Version, Keep-alive support, No-copy POST 2014-07-14 20:19:43 +08:00
service.c Trac 75: fix uxexpected ssl connection close 2014-07-06 09:36:44 +08:00
sha-1.c refactor out WIN32 tests from code 2014-04-02 14:25:10 +08:00
ssl-http2.c http2 add initial alpn support 2014-04-03 14:33:48 +08:00
ssl.c add runtime context flag to enforce defeat of OS CA CERTS even if build option selected 2014-07-06 09:36:44 +08:00