Giter Club home page Giter Club logo

Comments (2)

abligh avatar abligh commented on June 17, 2024

This can be fixed with the following diff:

diff --git a/mod_websocket_draft76.c b/mod_websocket_draft76.c
index ab571b9..ebe0bb1 100644
--- a/mod_websocket_draft76.c
+++ b/mod_websocket_draft76.c
@@ -496,7 +496,12 @@ static int mod_websocket_method_handler(request_rec *r)
                   mod_websocket_protocol_count, mod_websocket_protocol_index, mod_websocket_protocol_set,
                   mod_websocket_plugin_send, mod_websocket_plugin_close
                 };
-                const char *location = apr_pstrcat(r->pool, (secure ? "wss://" : "ws://"), host, r->parsed_uri.path, NULL);
+                const char *location;
+                if (r->parsed_uri.query && r->parsed_uri.query[0])
+                    location = apr_pstrcat(r->pool, (secure ? "wss://" : "ws://"), host, r->parsed_uri.path,
+                                           "?", r->parsed_uri.query, NULL);
+                else
+                    location = apr_pstrcat(r->pool, (secure ? "wss://" : "ws://"), host, r->parsed_uri.path, NULL);
                 void *plugin_private = NULL;

                 apr_table_clear(r->headers_out);

from apache-websocket.

disconnect avatar disconnect commented on June 17, 2024

This has already been fixed. Update to the latest code and you will see that r->parsed_uri.path has been changed to r->unparsed_uri.

from apache-websocket.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.