aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-01-31 00:51:22 +0000
committerJustin Clark-Casey (justincc)2014-01-31 00:51:22 +0000
commitb2878eb77354ea54a0a5e92fc30c3cd3ba1984fa (patch)
tree55094e48f86a95630e3854c64898ce146df063ed /OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs
parentMerge branch 'justincc-master' (diff)
parentMake sure Web streams are disposed after use (diff)
downloadopensim-SC-b2878eb77354ea54a0a5e92fc30c3cd3ba1984fa.zip
opensim-SC-b2878eb77354ea54a0a5e92fc30c3cd3ba1984fa.tar.gz
opensim-SC-b2878eb77354ea54a0a5e92fc30c3cd3ba1984fa.tar.bz2
opensim-SC-b2878eb77354ea54a0a5e92fc30c3cd3ba1984fa.tar.xz
Merge branch 'justincc-master'
Diffstat (limited to 'OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs')
-rw-r--r--OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs7
1 files changed, 3 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs
index c3a8afd..a7237ea 100644
--- a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs
+++ b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs
@@ -488,9 +488,8 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
488 byte[] data = Util.UTF8.GetBytes(OutboundBody); 488 byte[] data = Util.UTF8.GetBytes(OutboundBody);
489 489
490 Request.ContentLength = data.Length; 490 Request.ContentLength = data.Length;
491 Stream bstream = Request.GetRequestStream(); 491 using (Stream bstream = Request.GetRequestStream())
492 bstream.Write(data, 0, data.Length); 492 bstream.Write(data, 0, data.Length);
493 bstream.Close();
494 } 493 }
495 494
496 try 495 try
@@ -584,4 +583,4 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
584 Request.Abort(); 583 Request.Abort();
585 } 584 }
586 } 585 }
587} \ No newline at end of file 586}