Skip to content

Conversation

@mergify
Copy link

@mergify mergify bot commented Nov 25, 2025

Addresses #15001

The Web MQTT handler only accepts the mqtt WebSocket subprotocol, rejecting clients that request mqttv3.1. This prevents some MQTT clients from establishing WebSocket connections.

This change updates the protocol negotiation to accept either mqtt or mqttv3.1 subprotocols. The handler uses lists:search/2 to find the first matching protocol and echoes that exact value back in the sec-websocket-protocol response header, ensuring proper protocol negotiation with the client.


This is an automatic backport of pull request #15008 done by Mergify.
This is an automatic backport of pull request #15009 done by Mergify.

Addresses #15001

The Web MQTT handler only accepts the `mqtt` WebSocket subprotocol,
rejecting clients that request `mqttv3.1`. This prevents some MQTT
clients from establishing WebSocket connections.

This change updates the protocol negotiation to accept either `mqtt` or
`mqttv3.1` subprotocols. The handler uses `lists:search/2` to find the
first matching protocol and echoes that exact value back in the
`sec-websocket-protocol` response header, ensuring proper protocol
negotiation with the client.

(cherry picked from commit 12a6645)
(cherry picked from commit 89df4a2)
@michaelklishin michaelklishin added this to the 4.1.7 milestone Nov 25, 2025
@michaelklishin michaelklishin merged commit e605d34 into v4.1.x Nov 25, 2025
542 of 545 checks passed
@michaelklishin michaelklishin deleted the mergify/bp/v4.1.x/pr-15009 branch November 25, 2025 05:13
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

Successfully merging this pull request may close these issues.

3 participants