diff options
author | Atsushi Eno <atsushieno@gmail.com> | 2014-01-10 14:04:58 +0400 |
---|---|---|
committer | Atsushi Eno <atsushieno@gmail.com> | 2014-01-10 14:04:58 +0400 |
commit | bf909bcbd07f91e56c5ddb992e9277b691f9ae80 (patch) | |
tree | 67208c5bb677b5814ec34c0dbd6f003be041b3b3 /mcs/class | |
parent | 2fd8da492053ae769d09ac71a8e485f45c149028 (diff) |
fix bug #11335.
Diffstat (limited to 'mcs/class')
-rw-r--r-- | mcs/class/System.ServiceModel.Web/System.ServiceModel.Web/OutgoingWebRequestContext.cs | 1 | ||||
-rw-r--r-- | mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Web/WebOperationContextTest.cs | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Web/OutgoingWebRequestContext.cs b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Web/OutgoingWebRequestContext.cs index b3154c34b76..f26113c51bb 100644 --- a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Web/OutgoingWebRequestContext.cs +++ b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Web/OutgoingWebRequestContext.cs @@ -36,6 +36,7 @@ namespace System.ServiceModel.Web { internal OutgoingWebRequestContext () { + Headers = new WebHeaderCollection (); } public string Accept { get; set; } diff --git a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Web/WebOperationContextTest.cs b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Web/WebOperationContextTest.cs index d1e8ea5ff58..392a9cf54ec 100644 --- a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Web/WebOperationContextTest.cs +++ b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Web/WebOperationContextTest.cs @@ -61,6 +61,9 @@ namespace MonoTests.System.ServiceModel.Web Assert.IsNotNull (WebOperationContext.Current.IncomingRequest, "#4"); Assert.IsNotNull (WebOperationContext.Current.IncomingResponse, "#5"); Assert.IsNotNull (WebOperationContext.Current.OutgoingResponse, "#6"); // pointless though. + + Assert.IsNotNull (WebOperationContext.Current.OutgoingRequest.Headers, "#7"); + Assert.AreEqual (0, WebOperationContext.Current.OutgoingRequest.Headers.Count, "#8"); #endif } ch.Close (); |