mirror of
https://github.com/opensim/opensim.git
synced 2026-05-19 22:45:43 +08:00
Make sure Web streams are disposed after use
This commit is contained in:
committed by
Justin Clark-Casey (justincc)
parent
1380b37d71
commit
b8e22f02e7
@@ -488,9 +488,8 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
|
||||
byte[] data = Util.UTF8.GetBytes(OutboundBody);
|
||||
|
||||
Request.ContentLength = data.Length;
|
||||
Stream bstream = Request.GetRequestStream();
|
||||
bstream.Write(data, 0, data.Length);
|
||||
bstream.Close();
|
||||
using (Stream bstream = Request.GetRequestStream())
|
||||
bstream.Write(data, 0, data.Length);
|
||||
}
|
||||
|
||||
try
|
||||
@@ -584,4 +583,4 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
|
||||
Request.Abort();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user