mirror of
https://github.com/opensim/opensim.git
synced 2026-05-25 03:05:41 +08:00
* 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 that
This commit is contained in:
@@ -43,9 +43,8 @@ namespace OpenSim.Region.Environment.Modules.Scripting.LoadImageURL
|
||||
private Scene m_scene;
|
||||
private IDynamicTextureManager m_textureManager;
|
||||
|
||||
private string m_proxyurl = "";
|
||||
private string m_proxyexcepts = "";
|
||||
|
||||
private string m_proxyurl = "";
|
||||
private string m_proxyexcepts = "";
|
||||
|
||||
#region IDynamicTextureRender Members
|
||||
|
||||
@@ -95,8 +94,9 @@ namespace OpenSim.Region.Environment.Modules.Scripting.LoadImageURL
|
||||
{
|
||||
m_scene = scene;
|
||||
}
|
||||
m_proxyurl = config.Configs["Startup"].GetString("HttpProxy");
|
||||
m_proxyexcepts = config.Configs["Startup"].GetString("HttpProxyExceptions");
|
||||
|
||||
m_proxyurl = config.Configs["Startup"].GetString("HttpProxy");
|
||||
m_proxyexcepts = config.Configs["Startup"].GetString("HttpProxyExceptions");
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
@@ -127,15 +127,19 @@ namespace OpenSim.Region.Environment.Modules.Scripting.LoadImageURL
|
||||
private void MakeHttpRequest(string url, UUID requestID)
|
||||
{
|
||||
WebRequest request = HttpWebRequest.Create(url);
|
||||
if (m_proxyurl.Length > 0)
|
||||
{
|
||||
if (m_proxyexcepts.Length > 0) {
|
||||
string[] elist = m_proxyexcepts.Split(';');
|
||||
request.Proxy = new WebProxy(m_proxyurl,true,elist);
|
||||
} else {
|
||||
request.Proxy = new WebProxy(m_proxyurl,true);
|
||||
}
|
||||
}
|
||||
|
||||
if (m_proxyurl != null && m_proxyurl.Length > 0)
|
||||
{
|
||||
if (m_proxyexcepts != null && m_proxyexcepts.Length > 0)
|
||||
{
|
||||
string[] elist = m_proxyexcepts.Split(';');
|
||||
request.Proxy = new WebProxy(m_proxyurl, true, elist);
|
||||
}
|
||||
else
|
||||
{
|
||||
request.Proxy = new WebProxy(m_proxyurl, true);
|
||||
}
|
||||
}
|
||||
|
||||
RequestState state = new RequestState((HttpWebRequest) request, requestID);
|
||||
// IAsyncResult result = request.BeginGetResponse(new AsyncCallback(HttpRequestReturn), state);
|
||||
|
||||
Reference in New Issue
Block a user