aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorCharles Krinke2008-05-28 13:56:15 +0000
committerCharles Krinke2008-05-28 13:56:15 +0000
commitde43c2db57e113aacf45b13ae81b7db631c71358 (patch)
tree51c7e222fb28b0958ad533ea4c9325f1a008dea9 /OpenSim
parent* Implements duplicate packet tracking. This virtually eliminates object du... (diff)
downloadopensim-SC_OLD-de43c2db57e113aacf45b13ae81b7db631c71358.zip
opensim-SC_OLD-de43c2db57e113aacf45b13ae81b7db631c71358.tar.gz
opensim-SC_OLD-de43c2db57e113aacf45b13ae81b7db631c71358.tar.bz2
opensim-SC_OLD-de43c2db57e113aacf45b13ae81b7db631c71358.tar.xz
Mantis#1398. Thank you kindly, cmickeyb for a patch that:
small patch to encode and send the outbound_body parameter in an http request. this enables post messages to send a body
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Environment/Modules/Scripting/HttpRequest/ScriptsHttpRequests.cs12
1 files changed, 11 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Modules/Scripting/HttpRequest/ScriptsHttpRequests.cs b/OpenSim/Region/Environment/Modules/Scripting/HttpRequest/ScriptsHttpRequests.cs
index e0d5972..054b6fc 100644
--- a/OpenSim/Region/Environment/Modules/Scripting/HttpRequest/ScriptsHttpRequests.cs
+++ b/OpenSim/Region/Environment/Modules/Scripting/HttpRequest/ScriptsHttpRequests.cs
@@ -314,6 +314,16 @@ namespace OpenSim.Region.Environment.Modules.Scripting.HttpRequest
314 request.Method = httpMethod; 314 request.Method = httpMethod;
315 request.ContentType = httpMIMEType; 315 request.ContentType = httpMIMEType;
316 316
317 // Encode outbound data
318 if (outbound_body.Length > 0) {
319 byte[] data = Encoding.UTF8.GetBytes(outbound_body);
320
321 request.ContentLength = data.Length;
322 Stream bstream = request.GetRequestStream();
323 bstream.Write(data, 0, data.Length);
324 bstream.Close();
325 }
326
317 request.Timeout = httpTimeout; 327 request.Timeout = httpTimeout;
318 // execute the request 328 // execute the request
319 response = (HttpWebResponse) 329 response = (HttpWebResponse)
@@ -362,4 +372,4 @@ namespace OpenSim.Region.Environment.Modules.Scripting.HttpRequest
362 } 372 }
363 } 373 }
364 } 374 }
365} \ No newline at end of file 375}