From 91a5c602e313b96ffaf1d50b7f0d2923a2e141ba Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 30 Sep 2012 07:48:03 -0700 Subject: Revert "Added request.Proxy=null everywhere, as discussed in http://stackoverflow.com/questions/2519655/httpwebrequest-is-extremely-slow." But the patch is here, in case anyone wants to try it. This reverts commit 531edd51d82ecd6a842a2611c99e9919634491ef. --- .../CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs | 1 - .../CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs | 12 +++++------- .../CoreModules/Scripting/VectorRender/VectorRenderModule.cs | 1 - OpenSim/Region/CoreModules/World/Archiver/ArchiveHelpers.cs | 1 - OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs | 1 - OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs | 1 - 6 files changed, 5 insertions(+), 12 deletions(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs index 2be91c0..d328eb3 100644 --- a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs +++ b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs @@ -384,7 +384,6 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest Request = (HttpWebRequest) WebRequest.Create(Url); Request.Method = HttpMethod; Request.ContentType = HttpMIMEType; - Request.Proxy = null; if(!HttpVerifyCert) { diff --git a/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs b/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs index 5af3326..45e6527 100644 --- a/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs @@ -148,21 +148,19 @@ namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL private void MakeHttpRequest(string url, UUID requestID) { WebRequest request = HttpWebRequest.Create(url); - - if (m_proxyurl != null && m_proxyurl.Length > 0) + + if (m_proxyurl != null && m_proxyurl.Length > 0) { - if (m_proxyexcepts != null && m_proxyexcepts.Length > 0) + if (m_proxyexcepts != null && m_proxyexcepts.Length > 0) { string[] elist = m_proxyexcepts.Split(';'); request.Proxy = new WebProxy(m_proxyurl, true, elist); - } - else + } + else { request.Proxy = new WebProxy(m_proxyurl, true); } } - else - request.Proxy = null; RequestState state = new RequestState((HttpWebRequest) request, requestID); // IAsyncResult result = request.BeginGetResponse(new AsyncCallback(HttpRequestReturn), state); diff --git a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs index 9def6ee..b4e3d77 100644 --- a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs @@ -826,7 +826,6 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender try { WebRequest request = HttpWebRequest.Create(url); - request.Proxy = null; //Ckrinke: Comment out for now as 'str' is unused. Bring it back into play later when it is used. //Ckrinke Stream str = null; HttpWebResponse response = (HttpWebResponse)(request).GetResponse(); diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveHelpers.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveHelpers.cs index ff8f119..c72acc3 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveHelpers.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveHelpers.cs @@ -110,7 +110,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver request.ContentLength = 0; request.KeepAlive = false; - request.Proxy = null; WebResponse response = request.GetResponse(); Stream file = response.GetResponseStream(); diff --git a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs index c70031f..4694b14 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs @@ -352,7 +352,6 @@ namespace OpenSim.Region.CoreModules.World.Terrain request.ContentLength = 0; request.KeepAlive = false; - request.Proxy = null; WebResponse response = request.GetResponse(); Stream file = response.GetResponseStream(); diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs index 0fdc5a8..dfba3ff 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs @@ -819,7 +819,6 @@ namespace OpenSim.Region.CoreModules.World.WorldMap mapitemsrequest.Method = "POST"; mapitemsrequest.ContentType = "application/xml+llsd"; - mapitemsrequest.Proxy = null; OSDMap RAMap = new OSDMap(); // string RAMapString = RAMap.ToString(); -- cgit v1.1