-
Notifications
You must be signed in to change notification settings - Fork 873
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
Added custom headers support for WebSocket connection #505
Conversation
What going on?
|
…Socket connection
Hi @vit21ik, Thanks for your contribution, it looks quite useful! I'll review your changes today, but you'll need to update your commit messages to include the Signed-off-by message with the email address used to sign the ECA: https://wiki.eclipse.org/ECA before we can accept them. Thanks - James |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be possible for you to move the example from the MQTTv3.md file into the project Wiki Please?
Also, in MqttConnectOptions, please could you rename customHeaders to customWebsocketHeaders along with the Getter and Setter. Other than that it looks good!
@@ -81,7 +81,7 @@ | |||
private String[] serverURIs = null; | |||
private int mqttVersion = MQTT_VERSION_DEFAULT; | |||
private boolean automaticReconnect = false; | |||
|
|||
private Properties customHeaders = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason to use the type Properties
instead of a more generic Map<String,String>
? Properties
implement the very old and obsolete Dictionary
interface and new code should not necessarily use it if no old java properties file is read.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can see that Properties used for sslClientProps
private Properties sslClientProps = null;
From the beginning I used Map, but changed to Properties for uniformity with existed sslClientProps.
|
Thanks for making the updates @vit21ik, please could you update your commit messages to include the Signed-off-by message with the email address used to sign the ECA: https://wiki.eclipse.org/ECA, Otherwise we won't be able to accept them. |
# Conflicts: # org.eclipse.paho.client.mqttv3/src/main/java/org/eclipse/paho/client/mqttv3/MqttConnectOptions.java # org.eclipse.paho.mqttv5.client/src/main/java/org/eclipse/paho/mqttv5/client/MqttConnectionOptions.java
# Conflicts: # org.eclipse.paho.client.mqttv3/src/main/java/org/eclipse/paho/client/mqttv3/MqttConnectOptions.java # org.eclipse.paho.mqttv5.client/src/main/java/org/eclipse/paho/mqttv5/client/MqttConnectionOptions.java
Signed-off-by: Vitalii <vitalii.vlasiuk@temy.co> # Conflicts: # org.eclipse.paho.client.mqttv3/src/main/java/org/eclipse/paho/client/mqttv3/MqttConnectOptions.java # org.eclipse.paho.mqttv5.client/src/main/java/org/eclipse/paho/mqttv5/client/MqttConnectionOptions.java
Signed-off-by: Vitalii <vitalii.vlasiuk@temy.co>
…nto develop Signed-off-by: vvlasuk@gmail.com <vvlasuk@gmail.com>
Hi guys
|
You should squash all commits into one and sign that. The IP validation doesn't look at only the last commit, but all commits have to be signed with the correct e-mail. |
Created new pull request instead of this with correct Eclipse validation (sorry, I cannot manage with validation in current) |
Closed as this was resolved in PR #554 |
#502
Minor fix that allow use custom headers in request using WebSockets :
Added new parameter "customHeaders" to MqttConnectOptions
Pass this param to WebSocketHandshake
Added new custom headers to handshake request
Please make sure that the following boxes are checked before submitting your Pull Request, thank you!