mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 09:45:47 +08:00
a few changes on HGinventoryBroker p+lus cosmetics
This commit is contained in:
@@ -93,7 +93,7 @@ namespace OpenSim.Framework
|
||||
/// <summary>
|
||||
/// MemoryStream representing the resulting resource
|
||||
/// </summary>
|
||||
private Stream _resource;
|
||||
private MemoryStream _resource;
|
||||
|
||||
/// <summary>
|
||||
/// WebRequest object, held as a member variable
|
||||
@@ -313,7 +313,7 @@ namespace OpenSim.Framework
|
||||
/// <summary>
|
||||
/// Perform a synchronous request
|
||||
/// </summary>
|
||||
public Stream Request()
|
||||
public MemoryStream Request()
|
||||
{
|
||||
return Request(null);
|
||||
}
|
||||
@@ -321,7 +321,7 @@ namespace OpenSim.Framework
|
||||
/// <summary>
|
||||
/// Perform a synchronous request
|
||||
/// </summary>
|
||||
public Stream Request(IServiceAuth auth)
|
||||
public MemoryStream Request(IServiceAuth auth)
|
||||
{
|
||||
lock (_lock)
|
||||
{
|
||||
@@ -471,7 +471,7 @@ namespace OpenSim.Framework
|
||||
try
|
||||
{
|
||||
// Perform the operation; if sucessful set the result
|
||||
Stream s = Request(null);
|
||||
MemoryStream s = Request(null);
|
||||
ar.SetAsCompleted(s, false);
|
||||
}
|
||||
catch (Exception e)
|
||||
|
||||
@@ -1324,15 +1324,12 @@ namespace OpenSim.Framework
|
||||
{
|
||||
if (hwr != null)
|
||||
{
|
||||
if (hwr.StatusCode == HttpStatusCode.NotFound)
|
||||
return deserial;
|
||||
|
||||
if (hwr.StatusCode == HttpStatusCode.Unauthorized)
|
||||
{
|
||||
m_log.ErrorFormat("[SynchronousRestObjectRequester]: Web request {0} requires authentication",
|
||||
requestUrl);
|
||||
}
|
||||
else
|
||||
else if(hwr.StatusCode != HttpStatusCode.NotFound)
|
||||
{
|
||||
m_log.WarnFormat("[SynchronousRestObjectRequester]: Web request {0} returned error: {1}",
|
||||
requestUrl, hwr.StatusCode);
|
||||
@@ -1342,8 +1339,6 @@ namespace OpenSim.Framework
|
||||
m_log.ErrorFormat(
|
||||
"[SynchronousRestObjectRequester]: WebException for {0} {1} {2} {3}",
|
||||
verb, requestUrl, typeof(TResponse).ToString(), e.Message);
|
||||
|
||||
return deserial;
|
||||
}
|
||||
}
|
||||
catch (System.InvalidOperationException)
|
||||
|
||||
Reference in New Issue
Block a user