activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1000602 - in /activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.4.x: ./ src/main/csharp/Connection.cs
Date Thu, 23 Sep 2010 20:06:46 GMT
Author: tabish
Date: Thu Sep 23 20:06:46 2010
New Revision: 1000602

URL: http://svn.apache.org/viewvc?rev=1000602&view=rev
Log:
https://issues.apache.org/activemq/browse/AMQNET-281

Fix error in CreateSession URI parsing

Modified:
    activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.4.x/   (props changed)
    activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.4.x/src/main/csharp/Connection.cs

Propchange: activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.4.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Sep 23 20:06:46 2010
@@ -1 +1 @@
-/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk:995570
+/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk:995570,1000600

Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.4.x/src/main/csharp/Connection.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.4.x/src/main/csharp/Connection.cs?rev=1000602&r1=1000601&r2=1000602&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.4.x/src/main/csharp/Connection.cs
(original)
+++ activemq/activemq-dotnet/Apache.NMS.Stomp/branches/1.4.x/src/main/csharp/Connection.cs
Thu Sep 23 20:06:46 2010
@@ -359,9 +359,15 @@ namespace Apache.NMS.Stomp
             Session session = new Session(this, info, sessionAcknowledgementMode, this.dispatchAsync);
 
             // Set properties on session using parameters prefixed with "session."
-            StringDictionary options = URISupport.ParseQuery(this.brokerUri.Query);
-            options = URISupport.GetProperties(options, "session.");
-            URISupport.SetProperties(session, options);
+            if(!String.IsNullOrEmpty(brokerUri.Query) && !brokerUri.OriginalString.EndsWith(")"))
+            {
+                // Since the Uri class will return the end of a Query string found in a Composite
+                // URI we must ensure that we trim that off before we proceed.
+                string query = brokerUri.Query.Substring(brokerUri.Query.LastIndexOf(")")
+ 1);
+                StringDictionary options = URISupport.ParseQuery(query);
+                options = URISupport.GetProperties(options, "session.");
+                URISupport.SetProperties(session, options);
+            }
 
             session.ConsumerTransformer = this.ConsumerTransformer;
             session.ProducerTransformer = this.ProducerTransformer;



Mime
View raw message