-
-
Notifications
You must be signed in to change notification settings - Fork 161
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
415 error while trying to execute a rule manually #328
Comments
Hello, any feedback on this |
I too have this problem but seem to have narrowed it down a bit.
The error itself seems to be generated because a REST POST request is made, without setting the content-type in the header to application/json. As to WHERE in the code that's happening, I have no idea yet. |
I fixed this for myself in my personal cloud instance (though I think it's a bug in the OpenHab Core). The trouble is, when you're running rules directly, there is no data for the REST API call. I suspect that, because there is no data, the "content-type" setting for the request never gets set. I added a simple change in routes/index.js, Routes.prototype.proxyRouteOpenhab() to add a "content-type" header entry if there wasn't one, just before the call where the request is forwarded:
|
Alright, just adding content-type of plain/text is not the answer...It seems to have side effects that cause the web page not to load... |
I've had some time to do a little more research and SEEM to have it working now. I think the trouble is that the content-length is set (to zero) but no content-type gets set. So the fix that seems to work without any side effects is:
I've been using it for a while now without any side effects except my rule running properly. Could someone else please try it out and see if that's the fix? |
This fixes a number of open issues due to the fact that we were only accepting a limited number of http method types. The effect of this was some functionality like DELETE or HEAD requests would just not work when using the cloud service, which madee our UI look broken in different ways, also it poluted the users log with a lot of messages. openhab/openhab-core#2312 openhab/openhab-cloud#328 Signed-off-by: Dan Cunningham <[email protected]>
* Accept all Jetty supported http method types This fixes a number of open issues due to the fact that we were only accepting a limited number of http method types. The effect of this was some functionality like DELETE or HEAD requests would just not work when using the cloud service, which madee our UI look broken in different ways, also it poluted the users log with a lot of messages. Fixes openhab/openhab-core#2312 Fixes openhab/openhab-cloud#328 Signed-off-by: Dan Cunningham <[email protected]>
openhab/openhab-addons#10600 has been merged. |
…10600) * Accept all Jetty supported http method types This fixes a number of open issues due to the fact that we were only accepting a limited number of http method types. The effect of this was some functionality like DELETE or HEAD requests would just not work when using the cloud service, which madee our UI look broken in different ways, also it poluted the users log with a lot of messages. Fixes openhab/openhab-core#2312 Fixes openhab/openhab-cloud#328 Signed-off-by: Dan Cunningham <[email protected]> Signed-off-by: John Marshall <[email protected]>
…10600) * Accept all Jetty supported http method types This fixes a number of open issues due to the fact that we were only accepting a limited number of http method types. The effect of this was some functionality like DELETE or HEAD requests would just not work when using the cloud service, which madee our UI look broken in different ways, also it poluted the users log with a lot of messages. Fixes openhab/openhab-core#2312 Fixes openhab/openhab-cloud#328 Signed-off-by: Dan Cunningham <[email protected]>
…10600) * Accept all Jetty supported http method types This fixes a number of open issues due to the fact that we were only accepting a limited number of http method types. The effect of this was some functionality like DELETE or HEAD requests would just not work when using the cloud service, which madee our UI look broken in different ways, also it poluted the users log with a lot of messages. Fixes openhab/openhab-core#2312 Fixes openhab/openhab-cloud#328 Signed-off-by: Dan Cunningham <[email protected]>
…10600) * Accept all Jetty supported http method types This fixes a number of open issues due to the fact that we were only accepting a limited number of http method types. The effect of this was some functionality like DELETE or HEAD requests would just not work when using the cloud service, which madee our UI look broken in different ways, also it poluted the users log with a lot of messages. Fixes openhab/openhab-core#2312 Fixes openhab/openhab-cloud#328 Signed-off-by: Dan Cunningham <[email protected]>
* Accept all Jetty supported http method types This fixes a number of open issues due to the fact that we were only accepting a limited number of http method types. The effect of this was some functionality like DELETE or HEAD requests would just not work when using the cloud service, which madee our UI look broken in different ways, also it poluted the users log with a lot of messages. Fixes openhab/openhab-core#2312 Fixes openhab/openhab-cloud#328 Signed-off-by: Dan Cunningham <[email protected]>
On myopenhab.org
While trying to trigger a rule manually from UI by clicking the play button, there is an error "Error while running the rule: Ok"
In the openhab logs there is a 415 error
I have tried with other rules too as call be seen in the screenshots
When trying to do the same from local network, the rule is executed as expected.
I had posted here in the community but didn't get a response. I have also upgraded to the latest snapshot but this still remains
Expected behavior
The rule should execute
Steps to reproduce
The text was updated successfully, but these errors were encountered: