canonical libwebsockets.org websocket library
![]() 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> |
||
---|---|---|
cmake | ||
lib | ||
m4 | ||
scripts | ||
test-server | ||
win32port | ||
.gitignore | ||
autogen.sh | ||
changelog | ||
CMakeLists.txt | ||
config.h.cmake | ||
configure.ac | ||
COPYING | ||
INSTALL | ||
libwebsockets-api-doc.html | ||
libwebsockets.pc.in | ||
libwebsockets.spec | ||
LICENSE | ||
Makefile.am | ||
README | ||
README.build | ||
README.coding | ||
README.test-apps |
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