* minor: Apply second patch from http://opensimulator.org/mantis/view.php?id=3089
* This adds more explanation for the new proxy settings in OpenSim.ini.example * Also does some formatting correction * I did some additional reformatting on top of that0.6.3-post-fixes
parent
81019f96f1
commit
a6b21a3b83
|
@ -344,12 +344,16 @@ namespace OpenSim.Region.Environment.Modules.Scripting.HttpRequest
|
||||||
Request = (HttpWebRequest) WebRequest.Create(Url);
|
Request = (HttpWebRequest) WebRequest.Create(Url);
|
||||||
Request.Method = HttpMethod;
|
Request.Method = HttpMethod;
|
||||||
Request.ContentType = HttpMIMEType;
|
Request.ContentType = HttpMIMEType;
|
||||||
if (proxyurl.Length > 0)
|
|
||||||
|
if (proxyurl != null && proxyurl.Length > 0)
|
||||||
|
{
|
||||||
|
if (proxyexcepts != null && proxyexcepts.Length > 0)
|
||||||
{
|
{
|
||||||
if (proxyexcepts.Length > 0) {
|
|
||||||
string[] elist = proxyexcepts.Split(';');
|
string[] elist = proxyexcepts.Split(';');
|
||||||
Request.Proxy = new WebProxy(proxyurl, true, elist);
|
Request.Proxy = new WebProxy(proxyurl, true, elist);
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
Request.Proxy = new WebProxy(proxyurl, true);
|
Request.Proxy = new WebProxy(proxyurl, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -358,7 +362,8 @@ namespace OpenSim.Region.Environment.Modules.Scripting.HttpRequest
|
||||||
Request.Headers[entry.Key] = entry.Value;
|
Request.Headers[entry.Key] = entry.Value;
|
||||||
|
|
||||||
// Encode outbound data
|
// Encode outbound data
|
||||||
if (OutboundBody.Length > 0) {
|
if (OutboundBody.Length > 0)
|
||||||
|
{
|
||||||
byte[] data = Encoding.UTF8.GetBytes(OutboundBody);
|
byte[] data = Encoding.UTF8.GetBytes(OutboundBody);
|
||||||
|
|
||||||
Request.ContentLength = data.Length;
|
Request.ContentLength = data.Length;
|
||||||
|
|
|
@ -46,7 +46,6 @@ namespace OpenSim.Region.Environment.Modules.Scripting.LoadImageURL
|
||||||
private string m_proxyurl = "";
|
private string m_proxyurl = "";
|
||||||
private string m_proxyexcepts = "";
|
private string m_proxyexcepts = "";
|
||||||
|
|
||||||
|
|
||||||
#region IDynamicTextureRender Members
|
#region IDynamicTextureRender Members
|
||||||
|
|
||||||
public string GetName()
|
public string GetName()
|
||||||
|
@ -95,6 +94,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.LoadImageURL
|
||||||
{
|
{
|
||||||
m_scene = scene;
|
m_scene = scene;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_proxyurl = config.Configs["Startup"].GetString("HttpProxy");
|
m_proxyurl = config.Configs["Startup"].GetString("HttpProxy");
|
||||||
m_proxyexcepts = config.Configs["Startup"].GetString("HttpProxyExceptions");
|
m_proxyexcepts = config.Configs["Startup"].GetString("HttpProxyExceptions");
|
||||||
}
|
}
|
||||||
|
@ -127,12 +127,16 @@ namespace OpenSim.Region.Environment.Modules.Scripting.LoadImageURL
|
||||||
private void MakeHttpRequest(string url, UUID requestID)
|
private void MakeHttpRequest(string url, UUID requestID)
|
||||||
{
|
{
|
||||||
WebRequest request = HttpWebRequest.Create(url);
|
WebRequest request = HttpWebRequest.Create(url);
|
||||||
if (m_proxyurl.Length > 0)
|
|
||||||
|
if (m_proxyurl != null && m_proxyurl.Length > 0)
|
||||||
|
{
|
||||||
|
if (m_proxyexcepts != null && m_proxyexcepts.Length > 0)
|
||||||
{
|
{
|
||||||
if (m_proxyexcepts.Length > 0) {
|
|
||||||
string[] elist = m_proxyexcepts.Split(';');
|
string[] elist = m_proxyexcepts.Split(';');
|
||||||
request.Proxy = new WebProxy(m_proxyurl, true, elist);
|
request.Proxy = new WebProxy(m_proxyurl, true, elist);
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
request.Proxy = new WebProxy(m_proxyurl, true);
|
request.Proxy = new WebProxy(m_proxyurl, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,12 @@
|
||||||
crash_dir = "crashes"
|
crash_dir = "crashes"
|
||||||
|
|
||||||
; Http proxy support for llHTTPRequest and dynamic texture loading
|
; Http proxy support for llHTTPRequest and dynamic texture loading
|
||||||
|
; Set HttpProxy to the URL for your proxy server if you would like
|
||||||
|
; to proxy llHTTPRequests through a firewall
|
||||||
HttpProxy = "http://proxy.com"
|
HttpProxy = "http://proxy.com"
|
||||||
|
; Set HttpProxyExceptions to a list of regular expressions for
|
||||||
|
; URLs that you don't want going through the proxy such as servers
|
||||||
|
; inside your firewall, separate patterns with a ';'
|
||||||
HttpProxyExceptions = ".mydomain.com;localhost"
|
HttpProxyExceptions = ".mydomain.com;localhost"
|
||||||
|
|
||||||
; Set this to true if you are connecting your OpenSimulator regions to a grid
|
; Set this to true if you are connecting your OpenSimulator regions to a grid
|
||||||
|
|
Loading…
Reference in New Issue