diff options
author | UbitUmarov | 2014-10-15 14:14:25 +0100 |
---|---|---|
committer | UbitUmarov | 2014-10-15 14:14:25 +0100 |
commit | c643ff4cbadbe632654ff97d4d71f6abaa5b8605 (patch) | |
tree | 1cd2f0077dba0ae69724e0da7c6e83eb48e722ae /OpenSim/Framework/WebUtil.cs | |
parent | lso remove caps with "PUT" http method (diff) | |
download | opensim-SC-c643ff4cbadbe632654ff97d4d71f6abaa5b8605.zip opensim-SC-c643ff4cbadbe632654ff97d4d71f6abaa5b8605.tar.gz opensim-SC-c643ff4cbadbe632654ff97d4d71f6abaa5b8605.tar.bz2 opensim-SC-c643ff4cbadbe632654ff97d4d71f6abaa5b8605.tar.xz |
fix some errors when using http debug level > 4
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/WebUtil.cs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs index 86e5293..b5152e0 100644 --- a/OpenSim/Framework/WebUtil.cs +++ b/OpenSim/Framework/WebUtil.cs | |||
@@ -189,7 +189,10 @@ namespace OpenSim.Framework | |||
189 | { | 189 | { |
190 | if (DebugLevel == 5) | 190 | if (DebugLevel == 5) |
191 | { | 191 | { |
192 | output = output.Substring(0, 80); | 192 | int len = output.Length; |
193 | if(len > 80) | ||
194 | len = 80; | ||
195 | output = output.Substring(0, len); | ||
193 | output = output + "..."; | 196 | output = output + "..."; |
194 | } | 197 | } |
195 | 198 | ||
@@ -1035,13 +1038,13 @@ namespace OpenSim.Framework | |||
1035 | { | 1038 | { |
1036 | writer.Write(obj); | 1039 | writer.Write(obj); |
1037 | writer.Flush(); | 1040 | writer.Flush(); |
1041 | if (WebUtil.DebugLevel >= 5) | ||
1042 | WebUtil.LogOutgoingDetail(buffer); | ||
1038 | } | 1043 | } |
1039 | 1044 | ||
1040 | length = (int)obj.Length; | 1045 | length = (int)obj.Length; |
1041 | request.ContentLength = length; | 1046 | request.ContentLength = length; |
1042 | 1047 | ||
1043 | if (WebUtil.DebugLevel >= 5) | ||
1044 | WebUtil.LogOutgoingDetail(buffer); | ||
1045 | 1048 | ||
1046 | Stream requestStream = null; | 1049 | Stream requestStream = null; |
1047 | try | 1050 | try |
@@ -1188,14 +1191,13 @@ namespace OpenSim.Framework | |||
1188 | XmlSerializer serializer = new XmlSerializer(type); | 1191 | XmlSerializer serializer = new XmlSerializer(type); |
1189 | serializer.Serialize(writer, obj); | 1192 | serializer.Serialize(writer, obj); |
1190 | writer.Flush(); | 1193 | writer.Flush(); |
1194 | if (WebUtil.DebugLevel >= 5) | ||
1195 | WebUtil.LogOutgoingDetail(buffer); | ||
1191 | } | 1196 | } |
1192 | 1197 | ||
1193 | int length = (int)buffer.Length; | 1198 | int length = (int)buffer.Length; |
1194 | request.ContentLength = length; | 1199 | request.ContentLength = length; |
1195 | 1200 | ||
1196 | if (WebUtil.DebugLevel >= 5) | ||
1197 | WebUtil.LogOutgoingDetail(buffer); | ||
1198 | |||
1199 | Stream requestStream = null; | 1201 | Stream requestStream = null; |
1200 | try | 1202 | try |
1201 | { | 1203 | { |