canonical libwebsockets.org websocket library
Find a file
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
cmake CMake support + fixed windows build. 2013-02-06 15:49:12 +09:00
lib handle http union transition properly 2013-02-18 09:48:31 +08:00
m4 add empty m4 dir as workaround for autoreconf issue 2013-01-15 21:56:12 +08:00
scripts refactor-into-dirs.patch 2010-11-01 09:12:17 +00:00
test-server test server kill skt with minus 1 2013-02-17 09:14:08 +08:00
win32port remove deprecated vcxproj 2013-02-07 20:25:28 +08:00
.gitignore add static stack analysis 2013-02-10 10:49:15 +08:00
autogen.sh use autogen.sh 2012-10-06 15:17:01 +08:00
changelog api change deliver socket fd to in param of extpoll callbacks 2013-02-15 22:36:30 +08:00
CMakeLists.txt Fixed DLL compilation on Windows for CMake. 2013-02-13 09:29:26 +08:00
config.h.cmake Added some minor changes to CMake build file. 2013-02-06 15:49:12 +09:00
configure.ac bump version to 1.2 and soname to 3 2013-02-12 10:36:39 +08:00
COPYING add-COPYING-lgpl-2.1.patch 2010-11-08 17:12:19 +00:00
INSTALL add-INSTALL.patch 2010-11-12 13:11:50 +00:00
libwebsockets-api-doc.html api change deliver socket fd to in param of extpoll callbacks 2013-02-15 22:36:30 +08:00
libwebsockets.pc.in add pkg-config file libwebsockets.pc 2012-10-19 18:26:22 +08:00
libwebsockets.spec update rpm specfile 2013-02-12 15:48:00 +08:00
LICENSE add static linking exception to LICENSE 2013-02-07 23:44:21 +08:00
Makefile.am introduce library version plus git hash 2013-02-01 10:50:15 +08:00
README add README 2013-02-06 16:07:27 +09:00
README.build update memory performance info 2013-02-11 22:40:39 +08:00
README.coding README.coding add note about closing connections 2013-02-15 10:25:58 +08:00
README.test-apps introduce test echo 2013-01-30 12:28:44 +08:00

This is the libwebsockets C library for lightweight websocket clients and
servers.  For support, visit

 http://libwebsockets.org

and consider joining the project mailing list at

 http://ml.libwebsockets.org/mailman/listinfo/libwebsockets

You can get the latest version of the library from git

http://git.libwebsockets.org
https://github.com/warmcat/libwebsockets

for more information:

README.build      - information on building the library
README.coding     - information for writing code using the library
README.test-apps  - information about the test apps built with the library