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

[net] Expose Jetty EndPoint in http requests #4092

Merged
merged 2 commits into from Mar 2, 2024

Conversation

GiviMAD
Copy link
Member

@GiviMAD GiviMAD commented Feb 13, 2024

Hello, I would like to merge these small workaround that allows to access the underling Jetty EndPoint when using an http client created using the WebClientFactory.

It mimics the way the EndPoint is exposed in recent Jetty versions so it will become useless in case of an update.

I need it in order to proxy the socket data for upgraded WebSocket connections through the OpenHAB Cloud Connector.

Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
@GiviMAD GiviMAD requested a review from a team as a code owner February 13, 2024 20:39
Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
@GiviMAD
Copy link
Member Author

GiviMAD commented Feb 17, 2024

Hello @J-N-K, would you able to give your opinion on whetter is it good to merge this change or if it will be better to upgrade the Jetty client to a more recent version where the EndPoint is already exposed?

Jetty 9 is quite old but still listed as stable here https://eclipse.dev/jetty/download.php#version-table.

I needed it for the cloud connector PR openhab/openhab-addons#16403 to proxy the socket data between the cloud and the connector though the Socket.IO connection. I chosed that solution to avoid the parsing of the websocket frames in the cloud, as the cloud is shared by many clients I think this way is the less resource intensive.

@wborn
Copy link
Member

wborn commented Mar 1, 2024

whetter is it good to merge this change or if it will be better to upgrade the Jetty client to a more recent version where the EndPoint is already exposed?

The Jetty upgrade depends on Apache Karaf upgrading to a recent Pax Web version, see #3315. So until that becomes available the workaround makes sense.

Copy link
Member

@wborn wborn left a comment

Choose a reason for hiding this comment

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

Thanks for working on improving the WebSockets API compatibility!

@wborn wborn merged commit a94dd51 into openhab:main Mar 2, 2024
3 checks passed
@wborn wborn added this to the 4.2 milestone Mar 2, 2024
@wborn wborn added the enhancement An enhancement or new feature of the Core label Mar 2, 2024
@GiviMAD
Copy link
Member Author

GiviMAD commented Mar 2, 2024

Thank you for the review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature of the Core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants