libwebsockets/lib
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
..
base64-decode.c remove line end at 72 for base64 encode 2011-05-14 15:08:00 +02:00
client-handshake.c debug move most spew into debug macro 2011-11-07 19:53:23 +08:00
extension-deflate-stream.c debug move most spew into debug macro 2011-11-07 19:53:23 +08:00
extension-deflate-stream.h pass ext pointer in ext callback 2011-03-22 09:04:01 +00:00
extension-x-google-mux.c debug move most spew into debug macro 2011-11-07 19:53:23 +08:00
extension-x-google-mux.h x google mux handle illegal channel add indexes cleanup handle ch1 rx 2011-05-26 12:59:13 +01:00
extension.c introduce x google mux very draft indeed 2011-05-23 10:00:03 +01:00
handshake.c handle unsupported protocol correctly 2012-04-04 08:27:35 +08:00
libwebsockets.c Don't care for the human-readable part of "HTTP/1.1 101" reply 2012-02-19 17:26:17 +01:00
libwebsockets.h Add libwebsockets_ensure_user_space 2011-11-07 17:19:25 +08:00
Makefile.am introduce x google mux very draft indeed 2011-05-23 10:00:03 +01:00
Makefile.in introduce x google mux very draft indeed 2011-05-23 10:00:03 +01:00
md5.c introduce-private-md5-sha1.patch 2011-01-23 17:47:08 +00:00
parsers.c map wsorigin on to origin at an early point and stop dupe header mem leaks 2012-04-04 08:29:08 +08:00
private-libwebsockets.h v08v13 add support v13 default 2011-09-25 09:32:54 +01:00
sha-1.c Added BYTE_ORDER definition for win32 builds. 2011-10-03 19:30:27 +08:00