minor: If logging full incoming HTTP data, don't deceptively print ... at the end of the body.

0.7.4-extended
Justin Clark-Casey (justincc) 2012-11-20 04:10:03 +00:00
parent 41b76c4b9e
commit ee5e61d448
1 changed files with 5 additions and 2 deletions

View File

@ -719,8 +719,11 @@ namespace OpenSim.Framework.Servers.HttpServer
if (DebugLevel == 5) if (DebugLevel == 5)
{ {
const int sampleLength = 80; const int sampleLength = 80;
char[] sampleChars = new char[sampleLength]; char[] sampleChars = new char[sampleLength + 3];
reader.Read(sampleChars, 0, sampleLength); reader.Read(sampleChars, 0, sampleLength);
sampleChars[80] = '.';
sampleChars[81] = '.';
sampleChars[82] = '.';
output = new string(sampleChars); output = new string(sampleChars);
} }
else else
@ -728,7 +731,7 @@ namespace OpenSim.Framework.Servers.HttpServer
output = reader.ReadToEnd(); output = reader.ReadToEnd();
} }
m_log.DebugFormat("[BASE HTTP SERVER]: {0}...", output.Replace("\n", @"\n")); m_log.DebugFormat("[BASE HTTP SERVER]: {0}", output.Replace("\n", @"\n"));
} }
} }