Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAtsushi Eno <atsushi@ximian.com>2011-04-15 18:49:39 +0400
committerAtsushi Eno <atsushi@ximian.com>2011-04-15 18:49:39 +0400
commit8a8df8387be2a6f741e60a485cd7ff06bad027ac (patch)
tree69a628569946d46ca43e1436a5b7141a8fffaa5a /mcs/class/System.ServiceModel.Web/System.ServiceModel.Dispatcher
parentcc60bcc264a45cb4f6d6ccaa71324e8ad91dcef4 (diff)
Return null for empty message in WebMessageFormatter. Useful eror messages.
Diffstat (limited to 'mcs/class/System.ServiceModel.Web/System.ServiceModel.Dispatcher')
-rw-r--r--mcs/class/System.ServiceModel.Web/System.ServiceModel.Dispatcher/WebMessageFormatter.cs7
1 files changed, 5 insertions, 2 deletions
diff --git a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Dispatcher/WebMessageFormatter.cs b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Dispatcher/WebMessageFormatter.cs
index 6d2c2aba361..7ad2d99e8c2 100644
--- a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Dispatcher/WebMessageFormatter.cs
+++ b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Dispatcher/WebMessageFormatter.cs
@@ -169,7 +169,7 @@ namespace System.ServiceModel.Dispatcher
throw new ArgumentNullException ("messageVersion");
if (!MessageVersion.None.Equals (messageVersion))
- throw new ArgumentException ("Only MessageVersion.None is supported");
+ throw new ArgumentException (String.Format ("Only MessageVersion.None is supported. {0} is not.", messageVersion));
}
protected MessageDescription GetMessageDescription (MessageDirection dir)
@@ -197,7 +197,7 @@ namespace System.ServiceModel.Dispatcher
#endif
return json_serializer;
default:
- throw new NotImplementedException ();
+ throw new NotImplementedException (msgfmt.ToString ());
}
}
@@ -359,6 +359,9 @@ namespace System.ServiceModel.Dispatcher
throw new ArgumentNullException ("parameters");
CheckMessageVersion (message.Version);
+ if (message.IsEmpty)
+ return null; // empty message, could be returned by HttpReplyChannel.
+
string pname = WebBodyFormatMessageProperty.Name;
if (!message.Properties.ContainsKey (pname))
throw new SystemException ("INTERNAL ERROR: it expects WebBodyFormatMessageProperty existence");