diff options
| author | Gordon Sim <gsim@apache.org> | 2013-08-23 16:06:41 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2013-08-23 16:06:41 +0000 |
| commit | c26fc960c121e6f0eb58c7a971e5614629643eb1 (patch) | |
| tree | 3476cfc8d18cb5ea16a0eeb7b9341863ce401d70 /cpp/examples/messaging | |
| parent | 0eb45ebc51e1f420ac4f98b77496d193dd5dbf41 (diff) | |
| download | qpid-python-c26fc960c121e6f0eb58c7a971e5614629643eb1.tar.gz | |
QPID-5090: Infer text/plain as content type over 0-10 for utf8 content
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1516917 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/examples/messaging')
| -rw-r--r-- | cpp/examples/messaging/spout.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/cpp/examples/messaging/spout.cpp b/cpp/examples/messaging/spout.cpp index e80b434b3e..9c463d10b1 100644 --- a/cpp/examples/messaging/spout.cpp +++ b/cpp/examples/messaging/spout.cpp @@ -142,13 +142,14 @@ int main(int argc, char** argv) Message message; options.setProperties(message); + Variant& obj = message.getContentObject(); if (options.entries.size()) { Variant::Map content; options.setEntries(content); - message.getContentObject() = content; + obj = content; } else if (options.content.size()) { - message.setContent(options.content); - message.setContentType("text/plain"); + obj = options.content; + obj.setEncoding("utf8"); } std::time_t start = std::time(0); for (int count = 0; |
