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
Can't connect to Ktor WebSocket when running as WAR in Tomcat #1917
Comments
Having looked more into this I now think that forwarding websocket from Tomcat to Ktor is simply not implemented. In order to run Ktor in a servlet container the Servlet |
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks. |
KTOR 1.3.1 Server with WebSockets, Auth, Locations, Jackson, Servlet
In my application I defined a websocket route per the Websockets DSL:
When I connect to it via
ws://...
orwss://...
in standalone mode (KTOR from main) it works perfectly. When I deploy my app as WAR in Tomcat 9.0.8 and let KTOR run via Servlet and try to connect to the same websocket either securely or unsecure it gives a 501 HTTP Status with no further information.I turned on the tracing and found that the route works as expected:
the response I get is
I also tried to connect to a WebSocket that has no route defined and as expected I got a 404 error
The text was updated successfully, but these errors were encountered: