Massive tab and trailing space cleanup

This commit is contained in:
Melanie Thielker
2017-01-05 19:07:37 +00:00
parent e88e2945e9
commit b16abc8166
959 changed files with 23646 additions and 23646 deletions

View File

@@ -247,7 +247,7 @@ namespace OpenSim.Framework
request.MaximumAutomaticRedirections = 10;
request.ReadWriteTimeout = timeout / 4;
request.Headers[OSHeaderRequestID] = reqnum.ToString();
// If there is some input, write it into the request
if (data != null)
{
@@ -261,7 +261,7 @@ namespace OpenSim.Framework
byte[] buffer = System.Text.Encoding.UTF8.GetBytes(strBuffer);
request.ContentType = rpc ? "application/json-rpc" : "application/json";
if (compressed)
{
request.Headers["X-Content-Encoding"] = "gzip"; // can't set "Content-Encoding" because old OpenSims fail if they get an unrecognized Content-Encoding
@@ -294,7 +294,7 @@ namespace OpenSim.Framework
requestStream.Write(buffer, 0, buffer.Length); //Send it
}
}
// capture how much time was spent writing, this may seem silly
// but with the number concurrent requests, this often blocks
tickdata = Util.EnvironmentTickCountSubtract(tickstart);
@@ -354,7 +354,7 @@ namespace OpenSim.Framework
reqnum, tickdiff, tickdata);
}
}
m_log.DebugFormat(
"[LOGHTTP]: JSON-RPC request {0} {1} to {2} FAILED: {3}", reqnum, method, url, errorMessage);
@@ -378,7 +378,7 @@ namespace OpenSim.Framework
result["success"] = OSD.FromBoolean(true);
result["_RawResult"] = OSD.FromString(response);
result["_Result"] = new OSDMap();
if (response.Equals("true",System.StringComparison.OrdinalIgnoreCase))
return result;
@@ -389,7 +389,7 @@ namespace OpenSim.Framework
return result;
}
try
try
{
OSD responseOSD = OSDParser.Deserialize(response);
if (responseOSD.Type == OSDType.Map)
@@ -403,10 +403,10 @@ namespace OpenSim.Framework
// don't need to treat this as an error... we're just guessing anyway
// m_log.DebugFormat("[WEB UTIL] couldn't decode <{0}>: {1}",response,e.Message);
}
return result;
}
#endregion JSONRequest
#region FormRequest
@@ -419,7 +419,7 @@ namespace OpenSim.Framework
{
return ServiceFormRequest(url,data, 30000);
}
public static OSDMap ServiceFormRequest(string url, NameValueCollection data, int timeout)
{
lock (EndPointLock(url))
@@ -436,7 +436,7 @@ namespace OpenSim.Framework
if (DebugLevel >= 3)
m_log.DebugFormat("[LOGHTTP]: HTTP OUT {0} ServiceForm '{1}' to {2}",
reqnum, method, url);
string errorMessage = "unknown error";
int tickstart = Util.EnvironmentTickCount();
int tickdata = 0;
@@ -451,7 +451,7 @@ namespace OpenSim.Framework
request.MaximumAutomaticRedirections = 10;
request.ReadWriteTimeout = timeout / 4;
request.Headers[OSHeaderRequestID] = reqnum.ToString();
if (data != null)
{
queryString = BuildQueryString(data);
@@ -460,7 +460,7 @@ namespace OpenSim.Framework
LogOutgoingDetail("SEND", reqnum, queryString);
byte[] buffer = System.Text.Encoding.UTF8.GetBytes(queryString);
request.ContentLength = buffer.Length;
request.ContentType = "application/x-www-form-urlencoded";
using (Stream requestStream = request.GetRequestStream())
@@ -538,7 +538,7 @@ namespace OpenSim.Framework
}
#endregion FormRequest
#region Uri
/// <summary>
@@ -591,7 +591,7 @@ namespace OpenSim.Framework
}
/// <summary>
/// Appends a query string to a Uri that may or may not have existing
/// Appends a query string to a Uri that may or may not have existing
/// query parameters
/// </summary>
/// <param name="uri">Uri to append the query to</param>
@@ -643,7 +643,7 @@ namespace OpenSim.Framework
}
/// <summary>
///
///
/// </summary>
/// <param name="collection"></param>
/// <param name="key"></param>
@@ -662,12 +662,12 @@ namespace OpenSim.Framework
#region Stream
/// <summary>
/// Copies the contents of one stream to another, starting at the
/// Copies the contents of one stream to another, starting at the
/// current position of each stream
/// </summary>
/// <param name="copyFrom">The stream to copy from, at the position
/// <param name="copyFrom">The stream to copy from, at the position
/// where copying should begin</param>
/// <param name="copyTo">The stream to copy to, at the position where
/// <param name="copyTo">The stream to copy to, at the position where
/// bytes should be written</param>
/// <param name="maximumBytesToCopy">The maximum bytes to copy</param>
/// <returns>The total number of bytes copied</returns>
@@ -811,7 +811,7 @@ namespace OpenSim.Framework
/// </param>
/// <param name="maxConnections"></param>
/// <returns>
/// The response. If there was an internal exception or the request timed out,
/// The response. If there was an internal exception or the request timed out,
/// then the default(TResponse) is returned.
/// </returns>
public static void MakeRequest<TRequest, TResponse>(string verb,
@@ -909,7 +909,7 @@ namespace OpenSim.Framework
// If the server returns a 404, this appears to trigger a System.Net.WebException even though that isn't
// documented in MSDN
using (WebResponse response = request.EndGetResponse(res2))
{
{
try
{
using (Stream respStream = response.GetResponseStream())
@@ -930,7 +930,7 @@ namespace OpenSim.Framework
if (e.Response is HttpWebResponse)
{
using (HttpWebResponse httpResponse = (HttpWebResponse)e.Response)
{
{
if (httpResponse.StatusCode != HttpStatusCode.NotFound)
{
// We don't appear to be handling any other status codes, so log these feailures to that
@@ -955,7 +955,7 @@ namespace OpenSim.Framework
"[ASYNC REQUEST]: Request {0} {1} failed with exception {2}{3}",
verb, requestUrl, e.Message, e.StackTrace);
}
// m_log.DebugFormat("[ASYNC REQUEST]: Received {0}", deserial.ToString());
try
@@ -968,7 +968,7 @@ namespace OpenSim.Framework
"[ASYNC REQUEST]: Request {0} {1} callback failed with exception {2}{3}",
verb, requestUrl, e.Message, e.StackTrace);
}
}, null);
}
@@ -997,7 +997,7 @@ namespace OpenSim.Framework
}
}
finally
{
{
if (buffer != null)
buffer.Dispose();
}
@@ -1168,7 +1168,7 @@ namespace OpenSim.Framework
/// Request timeout in milliseconds. Timeout.Infinite indicates no timeout. If 0 is passed then the default HttpWebRequest timeout is used (100 seconds)
/// </param>
/// <returns>
/// The response. If there was an internal exception or the request timed out,
/// The response. If there was an internal exception or the request timed out,
/// then the default(TResponse) is returned.
/// </returns>
public static TResponse MakeRequest<TRequest, TResponse>(string verb, string requestUrl, TRequest obj, int pTimeout)
@@ -1191,7 +1191,7 @@ namespace OpenSim.Framework
/// </param>
/// <param name="maxConnections"></param>
/// <returns>
/// The response. If there was an internal exception or the request timed out,
/// The response. If there was an internal exception or the request timed out,
/// then the default(TResponse) is returned.
/// </returns>
public static TResponse MakeRequest<TRequest, TResponse>(string verb, string requestUrl, TRequest obj, int pTimeout, int maxConnections)
@@ -1210,7 +1210,7 @@ namespace OpenSim.Framework
/// </param>
/// <param name="maxConnections"></param>
/// <returns>
/// The response. If there was an internal exception or the request timed out,
/// The response. If there was an internal exception or the request timed out,
/// then the default(TResponse) is returned.
/// </returns>
public static TResponse MakeRequest<TRequest, TResponse>(string verb, string requestUrl, TRequest obj, int pTimeout, int maxConnections, IServiceAuth auth)
@@ -1375,7 +1375,7 @@ namespace OpenSim.Framework
return deserial;
}
public static class XMLResponseHelper
{
public static TResponse LogAndDeserialize<TRequest, TResponse>(int reqnum, Stream respStream, long contentLength)
@@ -1400,7 +1400,7 @@ namespace OpenSim.Framework
}
}
public static class XMLRPCRequester
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@@ -1444,7 +1444,7 @@ namespace OpenSim.Framework
{
m_log.Error("Error parsing XML-RPC response", e);
}
if (Resp.IsFault)
{
m_log.DebugFormat(