canonical libwebsockets.org websocket library
Find a file
Andy Green fd96330920 map wsorigin on to origin at an early point and stop dupe header mem leaks
Carlo wrote

''I'm interested to use the libwebsockets server (C based) with a Java
websocket client. I was able to implement a Java websocket client based
on JWebSocket library that works fine with the libwebsockets server, but
I was obliged to patch the libwebsockets server in order to reach my
goal. In particular I patched the handshake_00() function because
JWebSocket library uses hixie 76 version. The problem was that the
JWebSocket library sends only WSI_TOKEN_SWORIGIN token instead
WSI_TOKEN_ORIGIN token. For this reason the handshake_00 failed because
the token length of WSI_TOKEN_ORIGIN was 0. I have written a patch in
order to control if at least one of the two tokens (WSI_TOKEN_SWORIGIN
and WSI_TOKEN_ORIGIN) is defined. I have attached into the e-mail the
patch. Probably it can be written better, but in any case I think that
this problem should be fixed for client/server compatibility.''

I found a simpler approach which is convert WSORIGIN processing to
go into ORIGIN token at the earliest point, then everything else can
stay the same.

I also noticed we would leak on duplicated headers and fixed that.

Reported-by: Carlo PARATA <carlo.parata@st.com>
Signed-off-by: Andy Green <andy@warmcat.com>
2012-04-04 08:29:08 +08:00
lib map wsorigin on to origin at an early point and stop dupe header mem leaks 2012-04-04 08:29:08 +08:00
scripts refactor-into-dirs.patch 2010-11-01 09:12:17 +00:00
test-server test html uplevel detect browser and MozWebSocket 2011-09-25 10:01:02 +01:00
win32port cleanup fixes tested on win32 compiler 2011-11-09 15:55:16 +08:00
.gitignore Ignoring Release build and opensdf files. 2011-09-26 12:09:20 +01:00
aclocal.m4 fork-sever-process-and-introduce-broadcast-api.patch 2010-12-18 15:13:50 +00:00
config.guess remove symlinks-from-automake-missing 2010-11-10 11:57:07 +00:00
config.h.in configure add requirement for zlib.h 2011-03-06 13:37:10 +00:00
config.sub remove symlinks-from-automake-missing 2010-11-10 11:57:07 +00:00
configure introduce x google mux very draft indeed 2011-05-23 10:00:03 +01:00
configure.ac introduce x google mux very draft indeed 2011-05-23 10:00:03 +01:00
COPYING add-COPYING-lgpl-2.1.patch 2010-11-08 17:12:19 +00:00
depcomp remove symlinks-from-automake-missing 2010-11-10 11:57:07 +00:00
INSTALL add-INSTALL.patch 2010-11-12 13:11:50 +00:00
install-sh remove symlinks-from-automake-missing 2010-11-10 11:57:07 +00:00
libwebsockets-api-doc.html doc LWS_EXTERN 2011-10-03 19:30:22 +08:00
libwebsockets.spec uplevel-rpm-spec-to-include-new-extpoll-sample.patch 2011-02-13 09:08:11 +00:00
ltmain.sh fork-sever-process-and-introduce-broadcast-api.patch 2010-12-18 15:13:50 +00:00
Makefile.am introduce-ssl-client-connections--flow-control.patch 2011-01-27 06:26:52 +00:00
Makefile.in introduce-ssl-client-connections--flow-control.patch 2011-01-27 06:26:52 +00:00
missing remove symlinks-from-automake-missing 2010-11-10 11:57:07 +00:00
README-test-server extensions fix deflate stream vs mux and veto it on mux children 2011-05-28 10:19:19 +01:00