libwebsockets/lib
Andy Green 0caf9c5acb handle http union transition properly
There's no proper transition to http union state until now.

It only becomes apparant there's a problem when you try to
return -1 from the HTTP callback, during the close action
it will try to close() a nonsense, nonzero fd pointer in
the uninitialized u.http union member.

This patch takes a copy of the allocated headers struct from
the u.hdr union state, transitions to u.http clearing down u
and then calls the HTTP callback with URI args pointing to
the still-in-scope ah allocation.  After the call, the copy ah
is freed.

That makes sure we are in the correct union state while still
giving the HTTP callback access to the URI without having to
copy it around.

Reported-by: Edwin can den Oetelaar <oetelaar.automatisering@gmail.com>
Signed-off-by: Andy Green <andy.green@linaro.org>
2013-02-18 09:48:31 +08:00
..
.gitignore Ignoring linux build files 2013-01-09 15:46:11 +08:00
base64-decode.c CMake support + fixed windows build. 2013-02-06 15:49:12 +09:00
client-handshake.c fix ssl reject path for freeing header allocation 2013-02-11 21:43:41 +08:00
client-parser.c check for default protocol rx buf limit 2013-02-14 10:18:31 +08:00
client.c eliminate snprintf 2013-02-12 10:13:12 +08:00
daemonize.c style cleanup 2013-02-11 17:13:32 +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 Fixed DLL compilation on Windows for CMake. 2013-02-13 09:29:26 +08:00
getifaddrs.c style cleanup 2013-02-11 17:13:32 +08:00
getifaddrs.h style cleanup 2013-02-11 17:13:32 +08:00
handshake.c handle http union transition properly 2013-02-18 09:48:31 +08:00
libwebsockets.c handle any POLLIN before error 2013-02-16 10:17:52 +08:00
libwebsockets.h api change deliver socket fd to in param of extpoll callbacks 2013-02-15 22:36:30 +08:00
Makefile.am disable fstack usage 2013-02-13 09:08:43 +08:00
minilex.c add lexical parser for headers 2013-01-18 01:55:48 +08:00
output.c fix another escaape runon 2013-02-12 12:53:36 +08:00
parsers.c unstaged server changes 2013-02-14 11:25:44 +08:00
private-libwebsockets.h Fixed DLL compilation on Windows for CMake. 2013-02-13 09:29:26 +08:00
server-handshake.c eliminate snprintf 2013-02-12 10:13:12 +08:00
server.c introduce LWS_CALLBACK_HTTP_WRITEABLE 2013-02-14 22:23:54 +08:00
sha-1.c Static variable is now const. 2013-01-09 15:14:31 +08:00