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
Getting 426 Error when connecting via curl command #386
Comments
|
@LanceLake obs-websocket doesn't support plain http requests right now.
What patch? |
Well, it's responding to a call and there are websites out there that do calls to it. For example.. https://t2t2.github.io/obs-tablet-remote/ So yeah. It does allow for http requests.
Please see first link. Upgrade Required Server: Websocket++/0.8.1 Please see here (https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/426) for more info about the error. "The HTTP 426 Upgrade Required client error response code indicates that the server refuses to perform the request using the current protocol but might be willing to do so after the client upgrades to a different protocol." So how do I solve this issue? |
t2t2's obs-tablet-remote uses WebSockets, not plain HTTP calls. |
|
Correct. I'm also using a websocket call. Hence the error. |
|
I think your OP is missing information:
There is no code provided in that blank. |
|
It is a HTTP code. https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/426 "The HTTP 426 Upgrade Required client error response code indicates that the server refuses to perform the request using the current protocol but might be willing to do so after the client upgrades to a different protocol." The plugin is refusing the request using the current protocol and it needs to be upgraded to Websocket++/0.8.1 as that is now the standard for websocket connections thru HTTP. |
|
I know what an HTTP response code is. I'm saying that the way your OP is worded, it sounds like you were trying to insert a code sample of CFML, but nothing appeared in the post. "When I execute the following code..." What code are you executing? You've reported the error code but not the code that generated it. Your reproduction steps say "Execute above code which connects to the server and it returns a 426" but there is no code to execute to reproduce. Regardless, if the error you're getting is a 426, that means the code on your side needs to be upgraded, not on the obs-websocket side. Your code is the client, obs-websocket is the server, and the client is what needs to be upgraded. What version of ColdFusion are you running? |
|
@LanceLake What websockets library/function do you use in your code? |
|
This is the code I'm using.. There is no webserver set up on the computer. If I don't run OBS, it's not connecting (as expected). When I run the code again, I get this error.. HTTP/1.1 426 Upgrade Required Server: WebSocket++/0.8.1 The server I'm checking from is running Lucee 5.3.2.77 with Lucee Websockets extension of 2.0.3. Considering how it didn't work at all when OBS wasn't started and my websockets are as up to date as possible, perhaps when it says server, it meant the plugin since that's where I'm pulling pages from. Am I mistaken? |
|
Failing that.. Is there any way to be able to call remotely having a source turn on? That's all I want to do.. Have an alert in streamelements run some JS code to contact my computer and activate a source when it's run (via an alert). |
It´s responding because for a websocket you send a normal http header but with a request to upgrade the protocol. In your request you didn´t upgrade the protocol. cfhttp sends a normal http request, waits for it to complete and returns the result body.
The response header "Server: WebSocket++/0.8.1" is just an information that the underlying websocket-server, that is used in this plugin, sends (WebSocket++ is the name of the project and 0.8.1 is the current version that is running.) .
The websocket extension afaik only adds a websocket server, but no client functionality. Instead of these cfml tags you could use plain Javascript var socket = new Websocket("ws://localhost:4444");
socket.send( "requests as stated in docs/generated/protocol.md" );
socket.close(); |
Issue type
Bug report
Description
When I execute the following code (CFML)..
it returns an error code 426.
https://prnt.sc/pstskv
It shouldn't fail to process because a patch is out (speaking of which, does anyone know how to solve this issue on a windows machine)?
Steps to reproduce and other useful info
Execute above code which connects to the server and it returns a 426.
2019-11-05 07-17-56.txt
Technical information
The text was updated successfully, but these errors were encountered: