diff options
author | UbitUmarov | 2015-12-25 14:16:47 +0000 |
---|---|---|
committer | UbitUmarov | 2015-12-25 14:16:47 +0000 |
commit | 85a75ce0bcc7415030ef035a3497c22e5f3d83fb (patch) | |
tree | 2c3354f24defd234d18db44f2ff6452041833d93 /OpenSim/Region/CoreModules/Scripting | |
parent | try to implement HTTP_BODY_MAXLENGTH. Make it limit body input bytes. Read en... (diff) | |
download | opensim-SC-85a75ce0bcc7415030ef035a3497c22e5f3d83fb.zip opensim-SC-85a75ce0bcc7415030ef035a3497c22e5f3d83fb.tar.gz opensim-SC-85a75ce0bcc7415030ef035a3497c22e5f3d83fb.tar.bz2 opensim-SC-85a75ce0bcc7415030ef035a3497c22e5f3d83fb.tar.xz |
assume direct string.replace is good enought to avoid a stringbuild use
Diffstat (limited to 'OpenSim/Region/CoreModules/Scripting')
-rw-r--r-- | OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs index 401d65f..e1971cf 100644 --- a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs +++ b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs | |||
@@ -532,7 +532,6 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest | |||
532 | { | 532 | { |
533 | HttpWebResponse response = null; | 533 | HttpWebResponse response = null; |
534 | Stream resStream = null; | 534 | Stream resStream = null; |
535 | StringBuilder sb = new StringBuilder(); | ||
536 | byte[] buf = new byte[HttpBodyMaxLenMAX + 16]; | 535 | byte[] buf = new byte[HttpBodyMaxLenMAX + 16]; |
537 | string tempString = null; | 536 | string tempString = null; |
538 | int count = 0; | 537 | int count = 0; |
@@ -637,10 +636,7 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest | |||
637 | if(totalBodyBytes > 0) | 636 | if(totalBodyBytes > 0) |
638 | { | 637 | { |
639 | tempString = Util.UTF8.GetString(buf, 0, totalBodyBytes); | 638 | tempString = Util.UTF8.GetString(buf, 0, totalBodyBytes); |
640 | sb.Append(tempString); | 639 | ResponseBody = tempString.Replace("\r", ""); |
641 | sb.Replace("\r", ""); | ||
642 | ResponseBody = sb.ToString(); | ||
643 | sb.Clear(); | ||
644 | } | 640 | } |
645 | else | 641 | else |
646 | ResponseBody = ""; | 642 | ResponseBody = ""; |