-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Secure streams: ws protocol always "GET //" #3318
Comments
So, I looked at the code of the lws_generate_client_handshake() function. And I was very surprised. Function implies that if the request method is specified, the websocket protocol is ignored. I did not expect such a ridiculous behavior from such a well-thought-out and old library. What if the websocket server accepts connections only via PUT or POST? This is absolutely inflexible! |
After reviewing the library sources, I learned that it turns out that the "endpoint" field can specify a full link in the format "ws://host:port/uri". But what struck me most was that this was not specified anywhere in the documentation. In the large, detailed and well-formatted documentation, it is not explained that the "endpoint" field can specify a full link. There are many examples in the repository related to Secure streams, but of them, ONLY ONE example is directly dedicated to websocket (the example with binance), and in that example, the link is specified via the "http_url" field. This looks more like a plot of a comedy movie. |
It'd be great if you first understood a few basic points before sharing your galaxy-brain thoughts.
|
Secure streams 4.3.3 (4415e84c095857629863804e941b9e1c2e9347ef)
Policy JSON
{"release":"01234567","product":"w_agent","schema-version":1,"retry":[{"default":{"backoff":[1000,2000,3000,5000,10000],"conceal":5,"jitterpc":20,"svalidping":60,"svalidhup":64}}],"certs": [],"trust_stores": [],"s":[{"agent_connector": {"endpoint":"127.0.0.1","port": 10087,"protocol":"ws","http_url":"/agent_ws?instance_id=04ba2d147276bfeb2ed7fcaa68a7c361","nailed_up":true,"tls": false,"ws_prioritize_reads":true,"ws_binary": true,"retry":"default"}}]}
RESULT: ws-protocol always "GET //"
logs1.txt (git-hash of version is related with my local git server)
The text was updated successfully, but these errors were encountered: