commit 971773f1fae600074b46ef64f3ca1f76c227985f
Author: Glenn Strauss <gstrauss@gluelogic.com>
Date:   Wed Aug 3 01:20:56 2022 -0400

    [mod_wstunnel] fix crash with bad hybivers (fixes #3165)
    
    (thx Michał Dardas)
    
    x-ref:
      "mod_wstunnel null pointer dereference"
      https://redmine.lighttpd.net/issues/3165

diff --git a/src/mod_wstunnel.c b/src/mod_wstunnel.c
index 42886f0d..ce371bf7 100644
--- a/src/mod_wstunnel.c
+++ b/src/mod_wstunnel.c
@@ -485,7 +485,10 @@ static handler_t wstunnel_handler_setup (request_st * const r, plugin_data * con
     hctx->errh = r->conf.errh;/*(for mod_wstunnel-specific DEBUG_* macros)*/
     hctx->conf = p->conf; /*(copies struct)*/
     hybivers = wstunnel_check_request(r, hctx);
-    if (hybivers < 0) return HANDLER_FINISHED;
+    if (hybivers < 0) {
+        r->handler_module = NULL;
+        return HANDLER_FINISHED;
+    }
     hctx->hybivers = hybivers;
     if (0 == hybivers) {
         DEBUG_LOG_INFO("WebSocket Version = %s", "hybi-00");
