From 99167c68b19128410bfd25530df62aa93cd18a20 Mon Sep 17 00:00:00 2001 From: diva Date: Fri, 15 May 2009 21:11:37 +0000 Subject: Bug fix on POST asset so that the new asset service connector can talk to the old asset server. --- .../Framework/Servers/HttpServer/SynchronousRestObjectRequester.cs | 7 +++++-- 1 file 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 { using (WebResponse resp = request.GetResponse()) { - XmlSerializer deserializer = new XmlSerializer(typeof (TResponse)); - deserial = (TResponse) deserializer.Deserialize(resp.GetResponseStream()); + if (resp.ContentLength > 0) + { + XmlSerializer deserializer = new XmlSerializer(typeof(TResponse)); + deserial = (TResponse)deserializer.Deserialize(resp.GetResponseStream()); + } } } catch (System.InvalidOperationException) -- cgit v1.1