eclipse-paho / eclipse-paho/paho.mqtt.java

There was a bug when we used the Eclipse Paho MQTT Utility to publish the message when we selected a image

Open
#22 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
2.3k
Forks
919
PR merge metrics
No merged PRs in 30d

Description

migrated from Bugzilla [#477535](https://bugs.eclipse.org/bugs/show_bug.cgi?id=477535)
status UNCONFIRMED severity _normal_ in component _MQTT-Java_ for _1.2_
Reported in version _1.2_ on platform _PC_
Assigned to: James Sutton

Original attachment names and IDs:
- _[pahotoolbug.png](https://bugs.eclipse.org/bugs//attachment.cgi?id=256609)_ (ID 256609)
- _[EclipseClientMockup.png](https://bugs.eclipse.org/bugs//attachment.cgi?id=257977)_ (ID 257977)

On 2015-09-16 04:46:37 -0400, Henry Zhu wrote:

> After opening the Eclipse Paho MQTT Utility, we found that there was a bug when we used the Eclipse Paho MQTT Utility to publish the message when we selected a image file. The binary which was sent to the MQTT server was not the binary but the string format of binary. Meanwhile, the binary format is correct if we used the command which was provided by mosquitto using the below command, for example mosquitto_pub.exe -h 192.168.80.196 -p 1884 -f C:\temp\1.png -t test1

On 2015-09-16 04:49:30 -0400, Henry Zhu wrote:

> Created attachment 256609
> Eclipse Paho MQTT Utility issue

On 2015-11-16 10:26:42 -0500, James Sutton wrote:

> The behaviour isn't what I would expect either, I've had a look in the source, looks like the file reader simply tries to read the file as UTF-8 and if it fails, it reads the file in as a byte array but converts it to HEX.
>
> I propose that we add another Checkbox to the UI called 'Raw' that allows the user to choose between the file being sent as HEX or as a raw byte array (Which to me would be the expected behaviour)
>
> When the file is read in, we should keep it as the byte array internally and then only convert it to hex if the user ticks the box. Though we should keep the byte array in case they change their minds.

On 2015-11-16 10:27:19 -0500, James Sutton wrote:

> Created attachment 257977
> Mockup showing the raw check box

Contributor guide

Open the contributing guide

Research direction

Locate the Eclipse Paho MQTT Utility's file-publishing path and UI described by pahotoolbug.png and EclipseClientMockup.png. Compare its handling of image bytes with the raw bytes sent by the documented mosquitto_pub command; done means the utility provides the proposed raw-versus-HEX choice and publishes a selected image with the intended bytes.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
desktop, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.