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
0.6.0-stable
Charles Krinke 2008-05-28 13:56:15 +00:00
parent 715fbecd79
commit de43c2db57
1 changed files with 11 additions and 1 deletions

View File

@ -314,6 +314,16 @@ namespace OpenSim.Region.Environment.Modules.Scripting.HttpRequest
request.Method = httpMethod; request.Method = httpMethod;
request.ContentType = httpMIMEType; request.ContentType = httpMIMEType;
// Encode outbound data
if (outbound_body.Length > 0) {
byte[] data = Encoding.UTF8.GetBytes(outbound_body);
request.ContentLength = data.Length;
Stream bstream = request.GetRequestStream();
bstream.Write(data, 0, data.Length);
bstream.Close();
}
request.Timeout = httpTimeout; request.Timeout = httpTimeout;
// execute the request // execute the request
response = (HttpWebResponse) response = (HttpWebResponse)