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 body0.6.0-stable
parent
715fbecd79
commit
de43c2db57
|
@ -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)
|
||||||
|
@ -362,4 +372,4 @@ namespace OpenSim.Region.Environment.Modules.Scripting.HttpRequest
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue