kenhuuu commented on PR #2506:
URL: https://github.com/apache/tinkerpop/pull/2506#issuecomment-1977973238

   > @kenhuuu regarding the user agent header 
[used](https://tinkerpop.apache.org/docs/current/dev/provider/#_graph_driver_provider_requirements)
 by Gremlin server
   > 
   > This is likely a separate discussion, but `User-Agent` header might not be 
the best way to identify client supported GLV version. Since browser 
environment for example doesn't allow you to set or modify this for web socket 
connection.
   > 
   > What might be better is using the 
[`Sec-WebSocket-Protocol`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Protocol_upgrade_mechanism#sec-websocket-protocol)
 header instead. Which is designed to specify the sub-protocol requested by 
client & can be set in the browser by doing:
   > 
   > ```js
   > new WebSocket("ws://localhost:8182", "glv3.7");
   > ```
   > 
   > The sub-protocol can even be registered 
[here](https://www.iana.org/assignments/websocket/websocket.xml#subprotocol-name)
 if needed :))
   
   Thanks for the information. As I mentioned above, we'll be moving to HTTP 
only in 4.x so its probably best to keep the 3.x WebSocket behavior the same 
for now.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to