From e39dec6f371bc9c0fbb92e010ee7fd8fbeef7d18 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 12 May 2011 20:48:24 -0700 Subject: Hopefully this fixes offline messages. The problem was: the server is not setting the ContentLength of the response. That comes up to OpenSim as ContentLength=-1, which made the existing test fail. --- OpenSim/Framework/WebUtil.cs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs index 8fd34cf..27a646a 100644 --- a/OpenSim/Framework/WebUtil.cs +++ b/OpenSim/Framework/WebUtil.cs @@ -964,8 +964,6 @@ namespace OpenSim.Framework { requestStream = request.GetRequestStream(); requestStream.Write(buffer.ToArray(), 0, length); - m_log.DebugFormat("[XXX] Wrote to stream ok"); - } catch (Exception e) { @@ -979,13 +977,11 @@ namespace OpenSim.Framework } } - m_log.DebugFormat("[XXX] Getting response now... {0}", requestUrl); - try { using (WebResponse resp = request.GetResponse()) { - if (resp.ContentLength > 0) + if (resp.ContentLength != 0) { Stream respStream = resp.GetResponseStream(); XmlSerializer deserializer = new XmlSerializer(typeof(TResponse)); @@ -993,7 +989,7 @@ namespace OpenSim.Framework respStream.Close(); } else - m_log.DebugFormat("[SynchronousRestObjectRequester]: Oops! no content found in response stream from {0} {1}, ContentLength = {2}", requestUrl, verb, resp.ContentLength); + m_log.WarnFormat("[SynchronousRestObjectRequester]: Oops! no content found in response stream from {0} {1}", requestUrl, verb); } } @@ -1007,7 +1003,6 @@ namespace OpenSim.Framework m_log.WarnFormat("[SynchronousRestObjectRequester]: Exception on response from {0} {1}", requestUrl, e); } - m_log.DebugFormat("[XXX] reply is null? {0}", (deserial == null) ? "yes": "no"); return deserial; } } -- cgit v1.1