Skip to content

Fix WebSocket connection not working for HTTPS - #1738

Merged
wborn merged 2 commits into
openhab:mainfrom
florian-h05:http2
Apr 9, 2025
Merged

Fix WebSocket connection not working for HTTPS#1738
wborn merged 2 commits into
openhab:mainfrom
florian-h05:http2

Conversation

@florian-h05

@florian-h05 florian-h05 commented Apr 8, 2025

Copy link
Copy Markdown
Contributor

Regression from #1711.
Fixes openhab/openhab-webui#3125.

WebSocket was not working over HTTPS, because ALPN only had h2 available as protocol, but WebSocket is based on http/1.1. This adds http/1.1 to ALPN and the required HttpConnectionFactory as well.
"Standard" HTTP requests over HTTPS continue to use HTTP/2, whilst WebSocket works as well.

Also adds links to related JavaDoc as it is super annoying to search for the JavaDoc every time you need it.

Signed-off-by: Florian Hotze <dev@florianhotze.com>
Regression from openhab#1711.
Fixes openhab/openhab-webui#3125.

Signed-off-by: Florian Hotze <dev@florianhotze.com>

@wborn wborn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

@wborn
wborn merged commit a9ee0ea into openhab:main Apr 9, 2025
@wborn wborn added bug An unexpected problem or unintended behavior regression Regression that happened during the development of a release. Not shown on final release notes. labels Apr 9, 2025
@wborn wborn added this to the 5.0 milestone Apr 9, 2025
@florian-h05
florian-h05 deleted the http2 branch April 9, 2025 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug An unexpected problem or unintended behavior regression Regression that happened during the development of a release. Not shown on final release notes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Log Viewer] Does not work with HTTPS (only HTTP) also affects "Test WebSocket connection"

2 participants