You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2013/10/07 15:53:39 UTC
git commit: https://issues.apache.org/jira/browse/AMQCPP-515
Updated Branches:
refs/heads/3.8.x eccc0f71e -> 8eaedcb3b
https://issues.apache.org/jira/browse/AMQCPP-515
Fix overwriting newer property values with older ones in Stomp.
Project: http://git-wip-us.apache.org/repos/asf/activemq-cpp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-cpp/commit/8eaedcb3
Tree: http://git-wip-us.apache.org/repos/asf/activemq-cpp/tree/8eaedcb3
Diff: http://git-wip-us.apache.org/repos/asf/activemq-cpp/diff/8eaedcb3
Branch: refs/heads/3.8.x
Commit: 8eaedcb3b0e07d36153ec902887e643562646b59
Parents: eccc0f7
Author: Timothy Bish <ta...@gmai.com>
Authored: Mon Oct 7 09:53:26 2013 -0400
Committer: Timothy Bish <ta...@gmai.com>
Committed: Mon Oct 7 09:53:26 2013 -0400
----------------------------------------------------------------------
.../src/main/activemq/wireformat/stomp/StompFrame.cpp | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq-cpp/blob/8eaedcb3/activemq-cpp/src/main/activemq/wireformat/stomp/StompFrame.cpp
----------------------------------------------------------------------
diff --git a/activemq-cpp/src/main/activemq/wireformat/stomp/StompFrame.cpp b/activemq-cpp/src/main/activemq/wireformat/stomp/StompFrame.cpp
index 42918d2..511dc78 100644
--- a/activemq-cpp/src/main/activemq/wireformat/stomp/StompFrame.cpp
+++ b/activemq-cpp/src/main/activemq/wireformat/stomp/StompFrame.cpp
@@ -105,7 +105,6 @@ void StompFrame::toStream(decaf::io::DataOutputStream* stream) const {
}
if ((this->getBodyLength() == 0) || (this->getProperty(StompCommandConstants::HEADER_CONTENTLENGTH) != "")) {
-
stream->write('\0');
}
@@ -196,9 +195,7 @@ void StompFrame::readHeaders(decaf::io::DataInputStream* in) {
// Check for an empty line to demark the end of the header section.
// if its not the end then we have a header to process, so parse it.
if (numChars == 1 && buffer[0] == '\0') {
-
endOfHeaders = true;
-
} else {
// Search through this line to separate the key/value pair.
@@ -214,7 +211,9 @@ void StompFrame::readHeaders(decaf::io::DataInputStream* in) {
const char* value = reinterpret_cast<char*>(&buffer[ix + 1]);
// Assign the header key/value pair.
- this->getProperties().setProperty(key, value);
+ if (!this->getProperties().hasProperty(key)) {
+ this->getProperties().setProperty(key, value);
+ }
// Break out of the for loop.
break;