Merge pull request #2353 from ludovic-henry/fix-servicemodel-15153
authormonojenkins <jo.shields+jenkins@xamarin.com>
Wed, 16 Dec 2015 13:55:04 +0000 (13:55 +0000)
committermonojenkins <jo.shields+jenkins@xamarin.com>
Wed, 16 Dec 2015 13:55:04 +0000 (13:55 +0000)
Add test and merge #1879

@monojenkins merge

mcs/class/System.ServiceModel/System.ServiceModel/NetTcpBinding.cs
mcs/class/System.ServiceModel/Test/System.ServiceModel/NetTcpBindingTest.cs

index 4e1d5c4dfd0196da7d44cf5fe40327b198840c4d..794445155d8eefa93a107137ba23439db5470f6f 100644 (file)
@@ -43,7 +43,8 @@ namespace System.ServiceModel
                int max_conn;
                OptionalReliableSession reliable_session;
                NetTcpSecurity security;
-               XmlDictionaryReaderQuotas reader_quotas;
+               XmlDictionaryReaderQuotas reader_quotas
+                       = new XmlDictionaryReaderQuotas ();
                bool transaction_flow;
                TransactionProtocol transaction_protocol;
                TcpTransportBindingElement transport;
index 633b776aeac48c10c96f3b29d32d12e21dcad79e..cb78fe2be1e8ff98996257b561aefc74a1f6f482 100644 (file)
@@ -213,6 +213,13 @@ namespace MonoTests.System.ServiceModel
                        Assert.IsTrue (Foo.JoinCalled, "#2");
                }
 
+               [Test]
+               public void ReaderQuotasDefault_Bug15153 ()
+               {
+                       NetTcpBinding binding = new NetTcpBinding(SecurityMode.None);
+                       binding.ReaderQuotas.MaxStringContentLength = 8192;
+               }
+
                [ServiceContract]
                public interface IFoo
                {