-
Notifications
You must be signed in to change notification settings - Fork 14
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
Issue with onshape.com websockets #27
Comments
I've been delving into this today, and the conclusion I've come to is that the context.RequestAborted cancellation token is getting canceled, which means the request is getting aborted, right? The request is getting aborted before the socket is even created, it looks like to me, but I have no idea why. I'll keep examining this to see if I can get anywhere. |
@kfreezen If that cancellation token is being flagged/set then it's being done by the internal processing of kestrel itself. I'd be curious to know why kestrel would be aborting the connection. Maybe timeout? I have not had a chance to look at this stuff yet because I've had a nagging problem in some server side code of mine draining all of my time this week. I'm going to crack into this stuff over the weekend though. |
I've finally figured out where the problem lies, and it's not pretty. In FilterWebsocketHandler.cs at line 64ish, we have
cad.onshape.com sets a As far as I can tell, there is no way to force ASP.NET/Kestrel to return a matching protocol to the client browser on acceptance of the websocket connection. The only fix I can come up with is adding a method to do what we want to ASP.NET Core's code, issuing a PR, and hoping it gets accepted. |
@kfreezen Yikes. Well, there's probably exposed mechanisms buried in kestrel where we could handle it. First thing I'd check is to see if it's possible to build a connection handler like I did for handling HTTPS. You can get hold of the connection before kestrel does anything to it through an exposed interface. Might be a solution there. Worst case scenario you could do some reflection based hacks I guess to patch it. |
@kfreezen Nope the solution is to reply with the server-selected subprocotol inline in the What should be done though first is to establish the upstream client websocket connection, forward the |
wss://websocket.us.fleetmatics.com is not loading on https://reveal.fleetmatics.com/report/ Also a report of avery.com not working. |
Reorders websocket negotiation to get the negotiated subprotocol from the upstream websocket server before accepting the incoming client connection, in order to properly pass this on to the connected client and thus synchronize the subprotocol between upstream and downstream. Possible fix but probably not quite there yet, untested. Related to #27
This seems to be a different issue than #26 as a 502 is not returned. The server closes the connection without warning when connecting via onshape.com.
If I take the websocket URL and paste it into the websocket echo test, it connects fine.
@TechnikEmpire you can contact @montesound if you want to test the behavior.
The text was updated successfully, but these errors were encountered: