tornadoweb / tornado

Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed.
http://www.tornadoweb.org/
Apache License 2.0
21.76k stars 5.51k forks source link

Websocket Client Handshake URI issue #3366

Closed dmadisetti closed 8 months ago

dmadisetti commented 8 months ago

Hi there. I'm trying to hit:

wss://service.example/socket.io/1/websocket/?projectId=

from a service with

       request = HTTPRequest(
          wss_uri_with_query,
          headers={'Cookie': self.cookie},
           validate_cert=self.validate_cert)
       self.ws = await websocket_connect(request)

I'm getting back from my server:

 Raw server answer: 5:::{"name":"connectionRejected","args":[{"message":"missing/bad ?projectId=... query flag on handshake"}]}  

from https://github.com/overleaf/overleaf/blob/7f23f59df61c8089c9176fe0f2877eed2aa91b96/services/real-time/app/js/Router.js#L173

This works in browser, so I think the issue might be tornado? I wanted to run it by here to see if this is an easy fix before digging in.

Thanks!

dmadisetti commented 8 months ago

User error

Sorry