wss path returning 405

Issue #74 closed
Former user created an issue

Hi Peter,

I'm using the apache module wstunnel (mod_proxy_wstunnel) to tunnel my websocket traffic to a web socket running locally on another port. This way i can use wss instead of ws with a websocket-server that does not support wss. Apache tunnels the traffic based on a folder in the request, so I need the request-url to be:

wss://mydomain.com/wss/:443/

The websocket request-reponse sampler generates url: wss://mydomain.com:443/wss/ which returns reponsecode 405.

Is it possible to generate the url wss://mydomain.com/wss/:443/ ?

Regards, Pieter

Comments (7)

  1. Peter Doornbosch repo owner

    Hi Pieter,

    Sorry, i don't get it. Are you saying that you specify "wss://mydomain.com/wss/:443/" but the plugin is requesting "wss://mydomain.com/wss/:443/ "? If this is the case, please tell me more about how you configured the sampler, because i cannot reproduce this behaviour. See attached sample testplan (if you run it and view the request in the "View Results Tree", it displays the correct connect URL).

    Regards Peter

  2. Pieter Overbeeke

    Hi Peter,

    Thanks for the response.

    Your example results in request url:

    wss://echo.websocket.org:80/wss/:443 (Websocket I/O error)

    I need:

    1. wss://echo.websocket.org/wss/:443

    when i use port 443 and path /wss/ it results in

    1. wss://echo.websocket.org:443/wss/

    Somehow apache treats both request different. Request 1 is tunneled right through to my websocket server running on 127.0.0.1 port 9000 and the request 2 gets a 405 response (method not allowed).

    Regards, Pieter

  3. Peter Doornbosch repo owner

    Why do you use path "/wss/" if you need the path to be "/wss/:443"? Just use path "/wss/:443"?

    If you change port 80 to 443 in the sample, you'll get exactly what you need, as 443 is the default port for wss (so wss://echo.websocket.org/wss/:443 and wss://echo.websocket.org:443/wss/:443 are identical)

    Cheers,

    Peter

  4. Log in to comment