eclipse-paho / eclipse-paho/paho.mqtt.java
Paho client doesn't support custom headers for MQTT connection over WebSockets
- Dominant language
- Java
- Stars
- 2.3k
- Forks
- 919
- PR merge metrics
- No merged PRs in 30d
Description
When you need connection to MQTT broker using WebSockets, paho client sets default headers:
```
pw.print("Upgrade: websocket" + LINE_SEPARATOR);
pw.print("Connection: Upgrade" + LINE_SEPARATOR);
pw.print("Sec-WebSocket-Key: " + key + LINE_SEPARATOR);
pw.print("Sec-WebSocket-Protocol: mqtt" + LINE_SEPARATOR);
pw.print("Sec-WebSocket-Version: 13" + LINE_SEPARATOR);
```
In some cases required send custom headers, for example if you wanted to connect to AWS Iot broker.
https://docs.aws.amazon.com/iot/latest/developerguide/custom-auth.html
It would be great add custom headers support to WebSocket handshake request.
- [ ] Bug exists Release Version 1.2.0 ( Master Branch)
- [ ] Bug exists in Snapshot Version 1.2.1-SNAPSHOT (Develop Branch)
- [ ] Bug exists in MQTTv5 Version (mqttv5-new Branch)
If this is a bug regarding the Android Service, please raise the bug here instead: https://github.com/eclipse/paho.mqtt.android/issues/new
Contributor guide
Assessment
This issue has not been assessed yet.