From 531edd51d82ecd6a842a2611c99e9919634491ef Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 30 Sep 2012 07:22:55 -0700 Subject: Added request.Proxy=null everywhere, as discussed in http://stackoverflow.com/questions/2519655/httpwebrequest-is-extremely-slow. Thanks R.Gunther (rigun@rigutech.nl) https://lists.berlios.de/pipermail/opensim-users/2012-September/010986.html --- OpenSim/Services/Connectors/Hypergrid/HeloServicesConnector.cs | 1 + OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs | 1 + OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs | 1 + .../Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs | 6 +++++- OpenSim/Services/Connectors/SimianGrid/SimianGridMaptileModule.cs | 1 + 5 files changed, 9 insertions(+), 1 deletion(-) (limited to 'OpenSim/Services/Connectors') diff --git a/OpenSim/Services/Connectors/Hypergrid/HeloServicesConnector.cs b/OpenSim/Services/Connectors/Hypergrid/HeloServicesConnector.cs index 5c50936..089e878 100644 --- a/OpenSim/Services/Connectors/Hypergrid/HeloServicesConnector.cs +++ b/OpenSim/Services/Connectors/Hypergrid/HeloServicesConnector.cs @@ -77,6 +77,7 @@ namespace OpenSim.Services.Connectors public virtual string Helo() { HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create(m_ServerURI); + req.Proxy = null; // Eventually we need to switch to HEAD /* req.Method = "HEAD"; */ diff --git a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs index 2f263ae..8cd2daa 100644 --- a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs +++ b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs @@ -125,6 +125,7 @@ namespace OpenSim.Services.Connectors.Hypergrid AgentCreateRequest.Method = "POST"; AgentCreateRequest.ContentType = "application/json"; AgentCreateRequest.Timeout = 10000; + AgentCreateRequest.Proxy = null; //AgentCreateRequest.KeepAlive = false; //AgentCreateRequest.Headers.Add("Authorization", authKey); diff --git a/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs b/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs index 7429293..07142bf 100644 --- a/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs +++ b/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs @@ -107,6 +107,7 @@ namespace OpenSim.Services.Connectors helloNeighbourRequest.Method = "POST"; helloNeighbourRequest.ContentType = "application/json"; helloNeighbourRequest.Timeout = 10000; + helloNeighbourRequest.Proxy = null; // Fill it in OSDMap args = null; diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs index 6bfc5cc..2b00b4d 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs @@ -184,6 +184,7 @@ namespace OpenSim.Services.Connectors.SimianGrid { HttpWebRequest request = UntrustedHttpWebRequest.Create(url); request.Method = "HEAD"; + request.Proxy = null; using (WebResponse response = request.GetResponse()) { @@ -339,7 +340,8 @@ namespace OpenSim.Services.Connectors.SimianGrid // Simian does not require the asset ID to be in the URL because it's in the post data. // By appending it to the URL also, we allow caching proxies (squid) to invalidate asset URLs HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(m_serverUrl + asset.FullID.ToString()); - + request.Proxy = null; + HttpWebResponse response = MultipartForm.Post(request, postParameters); using (Stream responseStream = response.GetResponseStream()) { @@ -427,6 +429,7 @@ namespace OpenSim.Services.Connectors.SimianGrid { HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url); request.Method = "DELETE"; + request.Proxy = null; using (HttpWebResponse response = (HttpWebResponse)request.GetResponse()) { @@ -460,6 +463,7 @@ namespace OpenSim.Services.Connectors.SimianGrid try { HttpWebRequest request = UntrustedHttpWebRequest.Create(url); + request.Proxy = null; using (WebResponse response = request.GetResponse()) { diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianGridMaptileModule.cs b/OpenSim/Services/Connectors/SimianGrid/SimianGridMaptileModule.cs index 93fdae3..730d1da 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianGridMaptileModule.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianGridMaptileModule.cs @@ -212,6 +212,7 @@ namespace OpenSim.Region.OptionalModules.Simian HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(m_serverUrl); request.Timeout = 20000; request.ReadWriteTimeout = 5000; + request.Proxy = null; using (HttpWebResponse response = MultipartForm.Post(request, postParameters)) { -- cgit v1.1