diff options
author | Diva Canto | 2011-05-12 17:34:26 -0700 |
---|---|---|
committer | Diva Canto | 2011-05-12 17:34:26 -0700 |
commit | f54a36bd592fec6571ddfda81d12a546583ab123 (patch) | |
tree | 1094ae6dc41454b245efbd5ac0551b33b9dc6ce8 | |
parent | This makes compression of fatpacks actually work. Previously they always fail... (diff) | |
download | opensim-SC_OLD-f54a36bd592fec6571ddfda81d12a546583ab123.zip opensim-SC_OLD-f54a36bd592fec6571ddfda81d12a546583ab123.tar.gz opensim-SC_OLD-f54a36bd592fec6571ddfda81d12a546583ab123.tar.bz2 opensim-SC_OLD-f54a36bd592fec6571ddfda81d12a546583ab123.tar.xz |
Tracking a problem with offline IMs coming in as null list.
-rw-r--r-- | OpenSim/Framework/WebUtil.cs | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs index bc2cd01..2fd31d8 100644 --- a/OpenSim/Framework/WebUtil.cs +++ b/OpenSim/Framework/WebUtil.cs | |||
@@ -918,6 +918,10 @@ namespace OpenSim.Framework | |||
918 | 918 | ||
919 | public class SynchronousRestObjectRequester | 919 | public class SynchronousRestObjectRequester |
920 | { | 920 | { |
921 | private static readonly ILog m_log = | ||
922 | LogManager.GetLogger( | ||
923 | MethodBase.GetCurrentMethod().DeclaringType); | ||
924 | |||
921 | /// <summary> | 925 | /// <summary> |
922 | /// Perform a synchronous REST request. | 926 | /// Perform a synchronous REST request. |
923 | /// </summary> | 927 | /// </summary> |
@@ -972,9 +976,9 @@ namespace OpenSim.Framework | |||
972 | } | 976 | } |
973 | } | 977 | } |
974 | 978 | ||
975 | try | 979 | using (WebResponse resp = request.GetResponse()) |
976 | { | 980 | { |
977 | using (WebResponse resp = request.GetResponse()) | 981 | try |
978 | { | 982 | { |
979 | if (resp.ContentLength > 0) | 983 | if (resp.ContentLength > 0) |
980 | { | 984 | { |
@@ -984,10 +988,19 @@ namespace OpenSim.Framework | |||
984 | respStream.Close(); | 988 | respStream.Close(); |
985 | } | 989 | } |
986 | } | 990 | } |
987 | } | 991 | catch (System.InvalidOperationException) |
988 | catch (System.InvalidOperationException) | 992 | { |
989 | { | 993 | // This is what happens when there is invalid XML |
990 | // This is what happens when there is invalid XML | 994 | try |
995 | { | ||
996 | m_log.WarnFormat("[SynchronousRestObjectRequester]: Invalid XML:"); | ||
997 | using (StreamReader sr = new StreamReader(resp.GetResponseStream())) | ||
998 | m_log.WarnFormat("{0}", sr.ReadToEnd()); | ||
999 | } | ||
1000 | catch (Exception e) | ||
1001 | { } | ||
1002 | |||
1003 | } | ||
991 | } | 1004 | } |
992 | return deserial; | 1005 | return deserial; |
993 | } | 1006 | } |