1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-30 00:00:16 +01:00
libwebsockets/lib/roles/http
Andy Green 783540deaf client: libuv: fix close handling during redirect
During client redirect we "reset" the wsi to the redirect address,
involving closing the current fd that was told to redirect (it will
usually be a completely different server or port).

With libuv and its two-stage close that's not trivial.  This solves
the problem we will "reset" (overwrite) where the handle lives in the
wsi with new a new connection / handle by having it copied out into
an allocated watcher struct, which is freed in the uv close callback.

To confirm it the minimal ws client example gets some new options, the
original problem was replicated with this

$ lws-minimal-ws-client-echo -s invalid.url.com -p 80

https://github.com/warmcat/libwebsockets/issues/1390
2018-09-02 19:32:23 +08:00
..
client client: libuv: fix close handling during redirect 2018-09-02 19:32:23 +08:00
server log client IP of well-wishers 2018-09-02 06:56:09 +08:00
header.c h2: use vhost headers with tolower adaptation 2018-08-24 16:08:18 +08:00
lextable-strings.h refactor role ops 2018-04-11 13:39:42 +08:00
lextable.h refactor role ops 2018-04-11 13:39:42 +08:00
minilex.c refactor role ops 2018-04-11 13:39:42 +08:00
private.h http: defer transaction completed if partial pending 2018-06-16 13:24:26 +08:00