From d28107ed515549604fb1084730d7742d22539afe Mon Sep 17 00:00:00 2001 From: Nabin Bhandari Date: Sun, 27 Oct 2024 12:04:00 -0400 Subject: [PATCH] fix(iot-dev): Fix default Content Type and Content Encoding Set default Content Type of D2C Message to null and default Content Encoding to UTF-8. Github issue (fix#118) --- .../main/java/com/microsoft/azure/sdk/iot/device/Message.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iothub/device/iot-device-client/src/main/java/com/microsoft/azure/sdk/iot/device/Message.java b/iothub/device/iot-device-client/src/main/java/com/microsoft/azure/sdk/iot/device/Message.java index 19302e25dc..4be2ac7879 100644 --- a/iothub/device/iot-device-client/src/main/java/com/microsoft/azure/sdk/iot/device/Message.java +++ b/iothub/device/iot-device-client/src/main/java/com/microsoft/azure/sdk/iot/device/Message.java @@ -169,7 +169,7 @@ public Message(String body) initialize(); this.body = body.getBytes(DEFAULT_IOTHUB_MESSAGE_CHARSET); - this.setContentType(DEFAULT_IOTHUB_MESSAGE_CHARSET.name()); + this.setContentEncoding(DEFAULT_IOTHUB_MESSAGE_CHARSET.name()); }