mirror of
https://github.com/opensim/opensim.git
synced 2026-08-03 15:36:16 +08:00
Merge branch 'diva-textures-osgrid'
This commit is contained in:
@@ -91,24 +91,31 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
Stream requestStream = request.EndGetRequestStream(res);
|
||||
|
||||
requestStream.Write(buffer.ToArray(), 0, length);
|
||||
requestStream.Close();
|
||||
|
||||
request.BeginGetResponse(delegate(IAsyncResult ar)
|
||||
{
|
||||
response = request.EndGetResponse(ar);
|
||||
|
||||
Stream respStream = null;
|
||||
try
|
||||
{
|
||||
deserial = (TResponse) deserializer.Deserialize(
|
||||
response.GetResponseStream());
|
||||
respStream = response.GetResponseStream();
|
||||
deserial = (TResponse)deserializer.Deserialize(
|
||||
respStream);
|
||||
}
|
||||
catch (System.InvalidOperationException)
|
||||
{
|
||||
}
|
||||
finally
|
||||
{
|
||||
respStream.Close();
|
||||
response.Close();
|
||||
}
|
||||
|
||||
action(deserial);
|
||||
}, null);
|
||||
}, null);
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -119,14 +126,21 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
// If the server returns a 404, this appears to trigger a System.Net.WebException even though that isn't
|
||||
// documented in MSDN
|
||||
response = request.EndGetResponse(res2);
|
||||
|
||||
|
||||
Stream respStream = null;
|
||||
try
|
||||
{
|
||||
deserial = (TResponse)deserializer.Deserialize(response.GetResponseStream());
|
||||
respStream = response.GetResponseStream();
|
||||
deserial = (TResponse)deserializer.Deserialize(respStream);
|
||||
}
|
||||
catch (System.InvalidOperationException)
|
||||
{
|
||||
}
|
||||
finally
|
||||
{
|
||||
respStream.Close();
|
||||
response.Close();
|
||||
}
|
||||
}
|
||||
catch (WebException e)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user