Skip to content
This repository has been archived by the owner on Sep 20, 2021. It is now read-only.

Query string parameters seem unsupported? #61

Closed
pietervogelaar opened this issue Apr 9, 2016 · 3 comments
Closed

Query string parameters seem unsupported? #61

pietervogelaar opened this issue Apr 9, 2016 · 3 comments

Comments

@pietervogelaar
Copy link

It seems that query string parameters are unsupported. If I have a websocket URL like:

wss://br3-teapot.br.de/socket.io/?EIO=3&transport=websocket

I get an error

Handshake has failed, the server did not return a valid response.

Client:
    GET /socket.io/ HTTP/1.1
    ...

The query string is not in the HTTP request, but it is required. For example, if I test it on http://www.websocket.org/echo.html it works just fine with the complete url but not when the query string part is stripped.

This is a part of my code at the moment:

$socketClient = new SocketClient($url);
$webSocketClient = new WebSocketClient($socketClient);

What can I do to make this work?

@Hywan
Copy link
Member

Hywan commented Apr 10, 2016

Hello :-),

Good idea and thank you for the feature request. I reckon you can try a PR by yourself (if you want to!). The ws:// and wss:// URI are transformed into tcp:// and the line you might want to change could be

isset($parsed['path']) ? $parsed['path'] : '/'
. Do you want to try a PR?

@Hywan
Copy link
Member

Hywan commented May 9, 2016

Without no answer from your end, I decided to make a PR 😃. The review should start very quickly and the merge will happen as fast as possible because this is a bug fix.

@Bhoat Bhoat closed this as completed in #63 May 9, 2016
@Hywan Hywan removed the in progress label May 9, 2016
@Hywan
Copy link
Member

Hywan commented May 9, 2016

A new snapshot has been released: https://github.com/hoaproject/Websocket/releases/tag/3.16.05.09. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

2 participants