Andy Green [Tue, 29 Mar 2016 10:27:32 +0000 (18:27 +0800)]
revert cmake remove targets from install path
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Tue, 29 Mar 2016 00:51:42 +0000 (08:51 +0800)]
ssl split out common server and client ssl sources
Most of ssl.c is under a #ifdef for client or server disabled...
let's get rid of it and have CMake just build the appropriate
files
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Mon, 28 Mar 2016 04:43:55 +0000 (12:43 +0800)]
ssl migrate client pieces to ssl.c
Some ssl-specific code was still hiding out in client.c instead of
going in ssl.c
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Mon, 28 Mar 2016 02:12:37 +0000 (10:12 +0800)]
lwsws Libwebsockets Web Server
This makes a start on the LibWebSockets WebServer.
The app cmake build support and JSON config parsing are implemented and
the app can start, create the vhosts, listen and serve file:// mounts on
them.
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Mon, 28 Mar 2016 02:10:43 +0000 (10:10 +0800)]
introduce vhosts
This patch splits out some lws_context members into a new lws_vhost struct.
- ssl state and options per vhost
- SSL_CTX for serving and client per vhost
- protocols[] per vhost
- extensions[] per vhost
lws_context maintains a linked list of lws_vhosts.
The same lws_context_creation_info struct is used to regulate both the
context creation and to create vhosts: for backward compatibility if you
didn't provide the new LWS_SERVER_OPTION_EXPLICIT_VHOSTS option, then
a default vhost is created at context creation time using the same info
data as the context itself.
If you will have multiple vhosts though, you should give the
LWS_SERVER_OPTION_EXPLICIT_VHOSTS option at context creation time,
create the context first and then the vhosts afterwards using
lws_create_vhost(contest, &info);
Although there is a lot of housekeeping to implement this change, there
is almost no additional overhead if you don't use multiple vhosts and
very little api impact (no changes to test apps).
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Wed, 23 Mar 2016 05:04:58 +0000 (13:04 +0800)]
SNI for server side: receive callback
This takes tha callback and binds the lws_context to the SSL_CTX so we can
get the lws_context in the callback.
It just logs the incoming hostname atm.
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Fri, 25 Mar 2016 13:00:41 +0000 (21:00 +0800)]
http2 build with alpn capable ssl no debug
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Wed, 23 Mar 2016 01:22:11 +0000 (09:22 +0800)]
LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT to default to runtime ssl disable
https://github.com/warmcat/libwebsockets/issues/468
Adds lws_check_opt() to regularize multibit flag checking.
There's a new context creation flag LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT,
this is included automatically if you give any other SSL-related option flag.
If you give no SSL-related option flag, nor this one directly, then even
though SSL support may be compiled in, it is never initialized nor used for the
whole lifetime of the lws context.
Conversely in order to prepare the context to use SSL, even though, eg, you
are not listening on SSL but will use SSL client connections later, you can
give this flag explicitly to make sure SSL is initialized.
Signed-off-by: Andy Green <andy@warmcat.com>
Denis Osvald [Tue, 22 Mar 2016 13:04:15 +0000 (14:04 +0100)]
libuv: sigint API cleanup
Signed-off-by: Denis Osvald <denis.osvald@sartura.hr>
Denis Osvald [Tue, 22 Mar 2016 14:19:10 +0000 (15:19 +0100)]
libuv: handle signals only if requested
Signed-off-by: Denis Osvald <denis.osvald@sartura.hr>
Andy Green [Sun, 20 Mar 2016 03:55:25 +0000 (11:55 +0800)]
cgi env
Improve cgi support so it's capable of running cgit
Andy Green [Sun, 20 Mar 2016 03:59:53 +0000 (11:59 +0800)]
proxy rewrite
If you enable -DLWS_WITH_HTTP_PROXY=1 at cmake, the test server has a
new URI path http://localhost:7681/proxytest If you visit here, a client
connection to http://example.com:80 is spawned, and the results piped on
to your original connection.
Also with LWS_WITH_HTTP_PROXY enabled at cmake, lws wants to link to an
additional library, "libhubbub". This allows lws to do html rewriting on the
fly, adjusting proxied urls in a lightweight and fast way.
Andy Green [Sun, 13 Mar 2016 08:44:19 +0000 (16:44 +0800)]
client chunked transfer encoding
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Tue, 8 Mar 2016 23:41:59 +0000 (07:41 +0800)]
cgi header processing
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Fri, 18 Mar 2016 23:43:22 +0000 (07:43 +0800)]
b64decode correct decode of some strings
https://github.com/warmcat/libwebsockets/issues/467
Signed-off-by: Andy Green <andy@warmcat.com>
Andy Green [Fri, 18 Mar 2016 15:55:59 +0000 (23:55 +0800)]
clean signed mismatches and protect ssl specific code
https://github.com/warmcat/libwebsockets/issues/466
Signed-off-by: Andy Green <andy.green@linaro.org>
Alex Hultman [Fri, 18 Mar 2016 07:02:27 +0000 (15:02 +0800)]
lws_write restrict chunk size
Andy Green [Thu, 17 Mar 2016 07:26:49 +0000 (15:26 +0800)]
ssl option for auto redir to https
Signed-off-by: Andy Green <andy.green@linaro.org>
Alex Hultman [Thu, 17 Mar 2016 01:34:15 +0000 (09:34 +0800)]
Optimize payload exhaustion
https://github.com/warmcat/libwebsockets/pull/462
AG refactor and do loop unrolling
Andy Green [Thu, 17 Mar 2016 00:57:33 +0000 (08:57 +0800)]
appveyor update 1.0.2g
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Tue, 15 Mar 2016 13:49:32 +0000 (21:49 +0800)]
clang fixes 1
https://github.com/warmcat/libwebsockets/issues/461
Signed-off-by: Andy Green <andy.green@linaro.org>
bjqiwei [Tue, 15 Mar 2016 08:24:58 +0000 (16:24 +0800)]
client perform WSI_CREATE callback
Andy Green [Sat, 12 Mar 2016 00:18:58 +0000 (08:18 +0800)]
socket interface bind generalize to lws_socket_bind
Move the socket bind to interface code out of server into
libwebsockets.c and make a private api for it.
Signed-off-by: Andy Green <andy.green@linaro.org>
Joakim Soderberg [Sat, 12 Mar 2016 00:37:36 +0000 (08:37 +0800)]
ssl ecdh adapt if missing ecdh.h include
https://github.com/warmcat/libwebsockets/issues/457
Andy Green [Wed, 9 Mar 2016 15:13:31 +0000 (23:13 +0800)]
client ext hdr skip if no arg
https://github.com/warmcat/libwebsockets/issues/453#event-
583227314
abnf does say has to be at least one arg
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Wed, 9 Mar 2016 02:51:06 +0000 (10:51 +0800)]
release checklist specfile install soname
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Wed, 9 Mar 2016 02:50:25 +0000 (10:50 +0800)]
rpm specfile so install list bump
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Tue, 8 Mar 2016 23:44:49 +0000 (07:44 +0800)]
libev set foreign loop properly
After gaby64
https://github.com/warmcat/libwebsockets/issues/455
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Fri, 4 Mar 2016 02:53:51 +0000 (10:53 +0800)]
windows deal with no snprintf
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Mon, 29 Feb 2016 23:19:01 +0000 (07:19 +0800)]
test server http proxy
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Wed, 2 Mar 2016 01:17:22 +0000 (09:17 +0800)]
add explicit parent child wsi relationships
wsi can have a full tree relationship with each other using
linked lists. closing the parent ensures the children are
closed first.
Convert cgi to use this instead of his cgi-specific sub-wsi
management.
Signed-off-by: Andy Green <andy.green@linaro.org>
Alex Hultman [Wed, 2 Mar 2016 10:39:37 +0000 (11:39 +0100)]
libuv.c: Service fd with LWS_POLLHUP on poll errors
Ondraco [Mon, 29 Feb 2016 10:48:55 +0000 (18:48 +0800)]
wince minor adaptations
https://github.com/warmcat/libwebsockets/issues/444
Daniel Santos [Mon, 29 Feb 2016 23:24:28 +0000 (07:24 +0800)]
satisfy apparently bogus compiler warning somewhere
Andy Green [Mon, 29 Feb 2016 05:18:30 +0000 (13:18 +0800)]
client support http without ws
Server support for http[s] as well as ws[s] is implicit.
But until now client only supported ws[s].
This allows the user code to pass an explicit http method
like "GET" in the connect_info, disabling the ws upgrade logic.
Then you can also use lws client as http client, not just ws.
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Mon, 29 Feb 2016 06:19:16 +0000 (14:19 +0800)]
client accept connection request even if no free ah
It can join the free ah list and pick up client connect processing
later when the ah becomes available; this simplifies the code
doing the request since he won't have to deal with unexpected
failures / retries based on dynamic ah availability.
To do this though we have to handle that the connect_info members
may not have scope that lets them still exist after we return from
the first connect call, we stash them in a malloc'd buffer so the
connect processing can have them much later even so.
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Mon, 29 Feb 2016 03:26:13 +0000 (11:26 +0800)]
release checklist ab
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Sat, 27 Feb 2016 03:42:22 +0000 (11:42 +0800)]
adopt readbuf do service
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Mon, 29 Feb 2016 02:34:29 +0000 (10:34 +0800)]
libuv when in use skip shutdown close phase
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Mon, 29 Feb 2016 02:10:42 +0000 (10:10 +0800)]
windows listen for pollhup
After Ondraco
https://github.com/warmcat/libwebsockets/issues/441
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Sun, 28 Feb 2016 02:55:31 +0000 (10:55 +0800)]
ah move more_rx_waiting to wsi scope
Originally this was alright in wsi->u.hdr, because ah implied header
processing. But since we allowed ah to be held across http
keep-alive transactions if we saw we had more header data, it means
we were trying to read this union member out of scope after it had
transitioned.
Moving the more_rx_waiting member to be a 1-bit bifield in the wsi
solves it and lets us check the state any time later at http
transaction completion.
https://github.com/warmcat/libwebsockets/issues/441
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Sat, 27 Feb 2016 05:17:26 +0000 (13:17 +0800)]
test server libuv support status protocol
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Sat, 27 Feb 2016 03:03:27 +0000 (11:03 +0800)]
libuv create 1Hz background timeout check
Signed-off-by: Andy Green <andy.green@linaro.org>
Kamil Rytarowski [Sat, 27 Feb 2016 02:18:43 +0000 (03:18 +0100)]
Don't include <sys/cdefs.h> for NetBSD
We needed it for the BSD symbol to be defined, while __NetBSD__ is defined
with a compiler.
Thanks Andy Green for the initial fix.
Signed-off-by: Kamil Rytarowski <n54@gmx.com>
Andy Green [Sat, 27 Feb 2016 01:34:28 +0000 (09:34 +0800)]
netbsd netinet include
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Fri, 26 Feb 2016 02:48:51 +0000 (10:48 +0800)]
force service properly when unconsumed rxbuf in ah
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Fri, 26 Feb 2016 01:22:29 +0000 (09:22 +0800)]
adopt readbuf fix no ah path
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Thu, 25 Feb 2016 13:50:49 +0000 (21:50 +0800)]
close wsi must do detatch ah flow even if no ah
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Thu, 25 Feb 2016 13:39:01 +0000 (21:39 +0800)]
improve timeout and ah list comments
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Thu, 25 Feb 2016 13:43:09 +0000 (21:43 +0800)]
remove ah scan
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Thu, 25 Feb 2016 12:27:10 +0000 (20:27 +0800)]
fix missing callback return check
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Thu, 25 Feb 2016 07:12:16 +0000 (15:12 +0800)]
unix privs change group before user
Otherwise we no longer have privs to change the group after doing the user
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Thu, 25 Feb 2016 07:06:37 +0000 (15:06 +0800)]
test server log LWS_CALLBACK_HTTP
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Thu, 25 Feb 2016 07:01:55 +0000 (15:01 +0800)]
logging timestamp creation expose as api
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Sun, 21 Feb 2016 13:25:48 +0000 (21:25 +0800)]
cgi
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Wed, 24 Feb 2016 12:58:19 +0000 (20:58 +0800)]
user code must explicitly complete http transaction
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Wed, 24 Feb 2016 13:27:46 +0000 (21:27 +0800)]
defeat POLLOUT if socket in shutdown wait
After andrejs.hanins@ubnt.com
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Wed, 24 Feb 2016 03:05:56 +0000 (11:05 +0800)]
adopt variant with preamble rx
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Wed, 24 Feb 2016 04:40:21 +0000 (12:40 +0800)]
ws union member must have actual struct at start not pointer
Signed-off-by: Andy Green <andy.green@linaro.org>
Andrejs Hanins [Wed, 24 Feb 2016 10:54:37 +0000 (12:54 +0200)]
client callback closed if not upgraded also for server connection
https://github.com/warmcat/libwebsockets/issues/437
https://github.com/warmcat/libwebsockets/pull/440
Andrejs Hanins [Mon, 22 Feb 2016 15:32:52 +0000 (23:32 +0800)]
client connect must init position_in_fds_table
Andy Green [Sun, 21 Feb 2016 13:36:48 +0000 (21:36 +0800)]
windows doesnt have localtime_r
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Sun, 21 Feb 2016 07:13:15 +0000 (15:13 +0800)]
test server status no ssl include time header
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Sat, 20 Feb 2016 06:05:55 +0000 (14:05 +0800)]
test server add lws_status
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Sat, 20 Feb 2016 06:07:09 +0000 (14:07 +0800)]
LWS_BUILD_HASH improve
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Fri, 19 Feb 2016 23:52:35 +0000 (07:52 +0800)]
test html add tabs
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Sun, 21 Feb 2016 02:42:46 +0000 (10:42 +0800)]
libwebsockets.org url updates
Signed-off-by: Andy Green <andy.green@linaro.org>
Sebastian Reimer [Sat, 20 Feb 2016 23:42:49 +0000 (07:42 +0800)]
lwsl stderr sink use formatted time
AG change to use localtime_r for threadsafety and leave old method as fallback
Andy Green [Sat, 20 Feb 2016 23:08:28 +0000 (07:08 +0800)]
ssl get rid of build_cert_chain
It's not supported on major distro SSL (Fedora is 1.1) and
libressl (on 2.x) doesn't have it either.
https://github.com/warmcat/libwebsockets/issues/435
Signed-off-by: Andy Green <andy.green@linaro.org>
Alex Hultman [Sat, 20 Feb 2016 15:01:12 +0000 (16:01 +0100)]
Stop uv loop in default signal handler, clean-ups
Alex Hultman [Sat, 20 Feb 2016 14:32:57 +0000 (15:32 +0100)]
Make sure every handle is closed before destroying the uv loop
Alex Hultman [Sat, 20 Feb 2016 10:58:49 +0000 (11:58 +0100)]
Don't destroy ev/uv loops if they haven't been created yet
Andy Green [Sat, 20 Feb 2016 01:12:52 +0000 (09:12 +0800)]
changelog sync
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Sat, 20 Feb 2016 00:12:31 +0000 (08:12 +0800)]
attack.sh add check for nonexistant file processing
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Fri, 19 Feb 2016 23:53:24 +0000 (07:53 +0800)]
lws_return_http_status send content length
If we're sending content, we must do so with a
content-length on http/1.1
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Fri, 19 Feb 2016 04:46:36 +0000 (12:46 +0800)]
test server example systemd service file
Make sure you have daemonization enabled to use this
make .. -DLWS_WITHOUT_DAEMONIZE=0
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Fri, 19 Feb 2016 04:44:59 +0000 (12:44 +0800)]
daemonize work under systemd
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Fri, 19 Feb 2016 03:47:52 +0000 (11:47 +0800)]
ah pool lifetime use dynamic rxpos
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Fri, 19 Feb 2016 03:15:10 +0000 (11:15 +0800)]
test server allow set uid gid from cmdline
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Thu, 18 Feb 2016 13:01:27 +0000 (21:01 +0800)]
windows plat correct assert test in lws_poll_listen_fd
After https://github.com/warmcat/libwebsockets/issues/430
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Thu, 18 Feb 2016 12:36:55 +0000 (20:36 +0800)]
context creation info add ecdh_curve
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Thu, 18 Feb 2016 12:36:40 +0000 (20:36 +0800)]
test server SSL STS header delivery example
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Thu, 18 Feb 2016 12:36:23 +0000 (20:36 +0800)]
test server allow only best quality ciphers
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Thu, 18 Feb 2016 12:36:09 +0000 (20:36 +0800)]
ssl add server ecdh curve init
Using "real" SSL certs requires some init for openssl ECDH
curve. Add a default curve "prime256v1" and allow overriding it
at context creation time.
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Wed, 17 Feb 2016 03:58:51 +0000 (11:58 +0800)]
test server allow external certs
Allow the test server to use external certs for testing
libwebsockets-test-server --ssl -C libwebsockets.org.crt -K libwebsockets.org.key -A libwebsockets.org.cer
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Wed, 17 Feb 2016 03:09:58 +0000 (11:09 +0800)]
ssl ecdh check errors properly
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Tue, 16 Feb 2016 23:46:27 +0000 (07:46 +0800)]
more documentation typos
Signed-off-by: Andy Green <andy.green@linaro.org>
Peter Pentchev [Tue, 16 Feb 2016 13:19:36 +0000 (15:19 +0200)]
Fix some typos.
Andy Green [Tue, 16 Feb 2016 10:47:24 +0000 (18:47 +0800)]
debug reduce noise
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Tue, 16 Feb 2016 04:32:18 +0000 (12:32 +0800)]
v1.7.0
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Tue, 16 Feb 2016 05:20:30 +0000 (13:20 +0800)]
appveyor update openssl url
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Mon, 15 Feb 2016 13:08:18 +0000 (21:08 +0800)]
coverity 158147 test ping sprintf bounds
Well, just in the test app arg processing, but yes...
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Mon, 15 Feb 2016 13:07:09 +0000 (21:07 +0800)]
coverity 158146 test fraggle sprintf bounds
Well, just in the test app arg processing, but yes...
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Mon, 15 Feb 2016 13:00:39 +0000 (21:00 +0800)]
coverity 158145 lws_header_table_detatch must handle no ah attached
callers should protect it so this doesn't make a problem. But
Coverity is correct the code is confused about it.
Make it okay if we close a connection before the ah got attached.
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Mon, 15 Feb 2016 12:55:29 +0000 (20:55 +0800)]
release checklist coverity
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Mon, 15 Feb 2016 12:48:00 +0000 (20:48 +0800)]
api doc update pre 1.7
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Mon, 15 Feb 2016 12:36:02 +0000 (20:36 +0800)]
timeout settable from info
This adds an info member that allows the user code to
set the library's network action timeout in seconds.
If left at the default 0, the build-time default
AWAITING_TIMEOUT continues to be used.
As suggested
https://github.com/warmcat/libwebsockets/issues/427
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Mon, 15 Feb 2016 12:38:59 +0000 (20:38 +0800)]
release checklist api updates
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Mon, 15 Feb 2016 11:05:43 +0000 (19:05 +0800)]
http_transaction_completed handle two completions in detach reset order
Signed-off-by: Andy Green <andy.green@linaro.org>
Andy Green [Mon, 15 Feb 2016 04:37:04 +0000 (12:37 +0800)]
ah owns rxbuf
This is intended to solve a longstanding problem with the
relationship between http/1.1 keep-alive and the service
loop.
Ah now contain an rx buffer which is used during header
processing, and the ah may not be detached from the wsi
until the rx buffer is exhausted.
Having the rx buffer in the ah means we can delay using the
rx until a later service loop.
Ah which have pending rx force POLLIN service on the wsi
they are attached to automatically, so we can interleave
general service / connections with draining each ah rx
buffer.
The possible http/1.1 situations and their dispositions are:
1) exactly one set of http headers come. After processing,
the ah is detached since no pending rx left. If more
headers come later, a fresh ah is aqcuired when available
and the rx flow control blocks the read until then.
2) more that one whole set of headers come and we remain in
http mode (no upgrade). The ah is left attached and
returns to the service loop after the first set of headers.
We will get forced service due to the ah having pending
content (respecting flowcontrol) and process the pending
rx in the ah. If we use it all up, we will detach the
ah.
3) one set of http headers come with ws traffic appended.
We service the headers, do the upgrade, and keep the ah
until the remaining ws content is used. When we
exhausted the ws traffix in the ah rx buffer, we
detach the ah.
Since there can be any amount of http/1.1 pipelining on a
connection, and each may be expensive to service, it's now
enforced there is a return to the service loop after each
header set is serviced on a connection.
When I added the forced service for ah with pending buffering,
I added support for it to the windows plat code. However this
is untested.
Signed-off-by: Andy Green <andy.green@linaro.org>