aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorDiva Canto2011-05-12 20:48:24 -0700
committerDiva Canto2011-05-12 20:48:24 -0700
commite39dec6f371bc9c0fbb92e010ee7fd8fbeef7d18 (patch)
treed34a3deae8c9cde2257e124e6bf290bc145f3c92 /OpenSim/Framework
parentOne more thing printed out. #OfflineIM (diff)
downloadopensim-SC-e39dec6f371bc9c0fbb92e010ee7fd8fbeef7d18.zip
opensim-SC-e39dec6f371bc9c0fbb92e010ee7fd8fbeef7d18.tar.gz
opensim-SC-e39dec6f371bc9c0fbb92e010ee7fd8fbeef7d18.tar.bz2
opensim-SC-e39dec6f371bc9c0fbb92e010ee7fd8fbeef7d18.tar.xz
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.
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/WebUtil.cs9
1 files changed, 2 insertions, 7 deletions
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
964 { 964 {
965 requestStream = request.GetRequestStream(); 965 requestStream = request.GetRequestStream();
966 requestStream.Write(buffer.ToArray(), 0, length); 966 requestStream.Write(buffer.ToArray(), 0, length);
967 m_log.DebugFormat("[XXX] Wrote to stream ok");
968
969 } 967 }
970 catch (Exception e) 968 catch (Exception e)
971 { 969 {
@@ -979,13 +977,11 @@ namespace OpenSim.Framework
979 } 977 }
980 } 978 }
981 979
982 m_log.DebugFormat("[XXX] Getting response now... {0}", requestUrl);
983
984 try 980 try
985 { 981 {
986 using (WebResponse resp = request.GetResponse()) 982 using (WebResponse resp = request.GetResponse())
987 { 983 {
988 if (resp.ContentLength > 0) 984 if (resp.ContentLength != 0)
989 { 985 {
990 Stream respStream = resp.GetResponseStream(); 986 Stream respStream = resp.GetResponseStream();
991 XmlSerializer deserializer = new XmlSerializer(typeof(TResponse)); 987 XmlSerializer deserializer = new XmlSerializer(typeof(TResponse));
@@ -993,7 +989,7 @@ namespace OpenSim.Framework
993 respStream.Close(); 989 respStream.Close();
994 } 990 }
995 else 991 else
996 m_log.DebugFormat("[SynchronousRestObjectRequester]: Oops! no content found in response stream from {0} {1}, ContentLength = {2}", requestUrl, verb, resp.ContentLength); 992 m_log.WarnFormat("[SynchronousRestObjectRequester]: Oops! no content found in response stream from {0} {1}", requestUrl, verb);
997 993
998 } 994 }
999 } 995 }
@@ -1007,7 +1003,6 @@ namespace OpenSim.Framework
1007 m_log.WarnFormat("[SynchronousRestObjectRequester]: Exception on response from {0} {1}", requestUrl, e); 1003 m_log.WarnFormat("[SynchronousRestObjectRequester]: Exception on response from {0} {1}", requestUrl, e);
1008 } 1004 }
1009 1005
1010 m_log.DebugFormat("[XXX] reply is null? {0}", (deserial == null) ? "yes": "no");
1011 return deserial; 1006 return deserial;
1012 } 1007 }
1013 } 1008 }