Skip to content
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

Trailing slash in openHAB URL leads to error #374

Open
happenpappen opened this issue May 23, 2024 · 1 comment
Open

Trailing slash in openHAB URL leads to error #374

happenpappen opened this issue May 23, 2024 · 1 comment

Comments

@happenpappen
Copy link

happenpappen commented May 23, 2024

When selecting "openHAB" as command endpoint in WAS and setting the openHAB URL to "https://:8443/" the client will call the rest api with URL "https://:8443//rest/..." like in this example:

`I (05:27:42.682) WILLOW/OPENHAB: sending 'Light on the bathroom.' to openHAB REST API on 'https://example.org:8443//rest/voice/interpreters'

I (05:27:43.198) WILLOW/HTTP: HTTP status='405' content_length='618'
`

which will lead to an error "POST is not supported by this URL...". When i remove the trailing slash, the call will succeed.

Don't know, if this is more an openHAB or a Willow issue, but i think the double slash should be handled anywhere...

@nikito
Copy link
Contributor

nikito commented May 23, 2024

The issue is that technically, double slashes are allowed by the URL spec and normally it should work without issue, but maybe openHab doesn't like it. We could probably add some validation in the UI to not allow the user to enter a trailing slash. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants