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 - .../OptionalModules/Avatar/Concierge/ConciergeModule.cs | 2 +- .../Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs | 1 - .../Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs | 1 - .../XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs | 1 - .../Scripting/RegionReadyModule/RegionReadyModule.cs | 1 - 11 files changed, 6 insertions(+), 17 deletions(-) (limited to 'OpenSim/Region') 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(); diff --git a/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs b/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs index fbbb60f..e22618d 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs @@ -386,7 +386,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge updatePost.ContentType = "text/xml"; updatePost.ContentLength = payload.Length; updatePost.UserAgent = "OpenSim.Concierge"; - updatePost.Proxy = null; + BrokerState bs = new BrokerState(uri, payload, updatePost); bs.Timer = new Timer(delegate(object state) diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs index 8a5ce62..37ab35a 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs @@ -541,7 +541,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice forwardreq.Method = method; forwardreq.ContentType = contenttype; forwardreq.KeepAlive = false; - forwardreq.Proxy = null; if (method == "POST") { diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs index f5d8e19..c5fcef4 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs @@ -1119,7 +1119,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice // We are sending just parameters, no content req.ContentLength = 0; - req.Proxy = null; // Send request and retrieve the response rsp = (HttpWebResponse)req.GetResponse(); diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs index 5102115..d412cd1 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs @@ -1150,7 +1150,6 @@ namespace Nwc.XmlRpc request.ContentType = "text/xml"; request.AllowWriteStreamBuffering = true; request.KeepAlive = !_disableKeepAlive; - request.Proxy = null; Stream stream = request.GetRequestStream(); XmlTextWriter xml = new XmlTextWriter(stream, Encoding.ASCII); diff --git a/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs b/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs index 3e476ce..bad75f7 100644 --- a/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs @@ -280,7 +280,6 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady WebRequest request = WebRequest.Create(m_uri); request.Method = request_method; request.ContentType = content_type; - request.Proxy = null; Stream os = null; try -- cgit v1.1