diff options
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs index 5541063..d27869a 100644 --- a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs +++ b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs | |||
@@ -465,6 +465,7 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest | |||
465 | public void SendRequest() | 465 | public void SendRequest() |
466 | { | 466 | { |
467 | HttpWebResponse response = null; | 467 | HttpWebResponse response = null; |
468 | Stream resStream = null; | ||
468 | StringBuilder sb = new StringBuilder(); | 469 | StringBuilder sb = new StringBuilder(); |
469 | byte[] buf = new byte[8192]; | 470 | byte[] buf = new byte[8192]; |
470 | string tempString = null; | 471 | string tempString = null; |
@@ -547,7 +548,7 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest | |||
547 | 548 | ||
548 | Status = (int)response.StatusCode; | 549 | Status = (int)response.StatusCode; |
549 | 550 | ||
550 | Stream resStream = response.GetResponseStream(); | 551 | resStream = response.GetResponseStream(); |
551 | 552 | ||
552 | do | 553 | do |
553 | { | 554 | { |
@@ -605,6 +606,8 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest | |||
605 | } | 606 | } |
606 | finally | 607 | finally |
607 | { | 608 | { |
609 | if (resStream != null) | ||
610 | resStream.Close(); | ||
608 | if (response != null) | 611 | if (response != null) |
609 | response.Close(); | 612 | response.Close(); |
610 | } | 613 | } |