// Store the content type for later use
messageContentType = message.getContentType();
// Remove the erroneous headers from the message
// @todo ideally identified from the device repository
message.removeHeader("Message-ID");
message.removeHeader("Mime-Version");
message.removeHeader("Content-Type");
// Before anything is written to the output stream make sure that
// the response content type is set.