diff options
Diffstat (limited to 'OpenSim/Framework/Servers')
-rw-r--r-- | OpenSim/Framework/Servers/HttpServer/SynchronousRestObjectRequester.cs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/SynchronousRestObjectRequester.cs b/OpenSim/Framework/Servers/HttpServer/SynchronousRestObjectRequester.cs index a3da709..3bb4fd5 100644 --- a/OpenSim/Framework/Servers/HttpServer/SynchronousRestObjectRequester.cs +++ b/OpenSim/Framework/Servers/HttpServer/SynchronousRestObjectRequester.cs | |||
@@ -90,8 +90,11 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
90 | { | 90 | { |
91 | using (WebResponse resp = request.GetResponse()) | 91 | using (WebResponse resp = request.GetResponse()) |
92 | { | 92 | { |
93 | XmlSerializer deserializer = new XmlSerializer(typeof (TResponse)); | 93 | if (resp.ContentLength > 0) |
94 | deserial = (TResponse) deserializer.Deserialize(resp.GetResponseStream()); | 94 | { |
95 | XmlSerializer deserializer = new XmlSerializer(typeof(TResponse)); | ||
96 | deserial = (TResponse)deserializer.Deserialize(resp.GetResponseStream()); | ||
97 | } | ||
95 | } | 98 | } |
96 | } | 99 | } |
97 | catch (System.InvalidOperationException) | 100 | catch (System.InvalidOperationException) |