Repository: qpid-dispatch Updated Branches: refs/heads/master 5220221f6 -> c728d7f41
DISPATCH-941: Router is returning incorrect files from http get Bug in http-libwebsockets code. A partial HTTP handler such as we have needs to call lws_callback_http_dummy() to fill in default HTTP behaviours. Without that the LWS library was not properly informed of termination of HTTP transactions causing confusion if a connection was re-used. Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/c728d7f4 Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/c728d7f4 Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/c728d7f4 Branch: refs/heads/master Commit: c728d7f41c78ccc8db127b87c11470a5b9bc8c82 Parents: 5220221 Author: Alan Conway <acon...@redhat.com> Authored: Tue May 29 14:21:15 2018 -0400 Committer: Alan Conway <acon...@redhat.com> Committed: Tue May 29 14:21:15 2018 -0400 ---------------------------------------------------------------------- src/http-libwebsockets.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/c728d7f4/src/http-libwebsockets.c ---------------------------------------------------------------------- diff --git a/src/http-libwebsockets.c b/src/http-libwebsockets.c index 398a7ec..6df0cca 100644 --- a/src/http-libwebsockets.c +++ b/src/http-libwebsockets.c @@ -340,20 +340,14 @@ static int callback_http(struct lws *wsi, enum lws_callback_reasons reason, void *user, void *in, size_t len) { switch (reason) { - case LWS_CALLBACK_PROTOCOL_DESTROY: qd_http_listener_free(wsi_listener(wsi)); - return -1; - - case LWS_CALLBACK_HTTP: { - /* Called if file mount can't find the file */ - lws_return_http_status(wsi, HTTP_STATUS_NOT_FOUND, (char*)in); - return -1; - } - - default: - return 0; + break; + default: + break; } + /* Do default HTTP handling for all the cases we don't care about. */ + return lws_callback_http_dummy(wsi, reason, user, in, len); } /* Wake up a connection managed by the http server thread */ --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org