aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/WebUtil.cs
diff options
context:
space:
mode:
authorDiva Canto2012-09-30 07:22:55 -0700
committerDiva Canto2012-09-30 07:22:55 -0700
commit531edd51d82ecd6a842a2611c99e9919634491ef (patch)
tree0e28069aa1b2278f91b9275f98db7990abb7d964 /OpenSim/Framework/WebUtil.cs
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC-531edd51d82ecd6a842a2611c99e9919634491ef.zip
opensim-SC-531edd51d82ecd6a842a2611c99e9919634491ef.tar.gz
opensim-SC-531edd51d82ecd6a842a2611c99e9919634491ef.tar.bz2
opensim-SC-531edd51d82ecd6a842a2611c99e9919634491ef.tar.xz
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
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/WebUtil.cs5
1 files changed, 5 insertions, 0 deletions
diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs
index 1d9e2ce..9eff0d2 100644
--- a/OpenSim/Framework/WebUtil.cs
+++ b/OpenSim/Framework/WebUtil.cs
@@ -171,6 +171,7 @@ namespace OpenSim.Framework
171 request.Method = method; 171 request.Method = method;
172 request.Timeout = timeout; 172 request.Timeout = timeout;
173 request.KeepAlive = false; 173 request.KeepAlive = false;
174 request.Proxy = null;
174 request.MaximumAutomaticRedirections = 10; 175 request.MaximumAutomaticRedirections = 10;
175 request.ReadWriteTimeout = timeout / 4; 176 request.ReadWriteTimeout = timeout / 4;
176 request.Headers[OSHeaderRequestID] = reqnum.ToString(); 177 request.Headers[OSHeaderRequestID] = reqnum.ToString();
@@ -350,6 +351,7 @@ namespace OpenSim.Framework
350 request.Method = "POST"; 351 request.Method = "POST";
351 request.Timeout = timeout; 352 request.Timeout = timeout;
352 request.KeepAlive = false; 353 request.KeepAlive = false;
354 request.Proxy = null;
353 request.MaximumAutomaticRedirections = 10; 355 request.MaximumAutomaticRedirections = 10;
354 request.ReadWriteTimeout = timeout / 4; 356 request.ReadWriteTimeout = timeout / 4;
355 request.Headers[OSHeaderRequestID] = reqnum.ToString(); 357 request.Headers[OSHeaderRequestID] = reqnum.ToString();
@@ -730,6 +732,7 @@ namespace OpenSim.Framework
730 Type type = typeof(TRequest); 732 Type type = typeof(TRequest);
731 733
732 WebRequest request = WebRequest.Create(requestUrl); 734 WebRequest request = WebRequest.Create(requestUrl);
735 request.Proxy = null;
733 WebResponse response = null; 736 WebResponse response = null;
734 TResponse deserial = default(TResponse); 737 TResponse deserial = default(TResponse);
735 XmlSerializer deserializer = new XmlSerializer(typeof(TResponse)); 738 XmlSerializer deserializer = new XmlSerializer(typeof(TResponse));
@@ -924,6 +927,7 @@ namespace OpenSim.Framework
924 927
925 WebRequest request = WebRequest.Create(requestUrl); 928 WebRequest request = WebRequest.Create(requestUrl);
926 request.Method = verb; 929 request.Method = verb;
930 request.Proxy = null;
927 string respstring = String.Empty; 931 string respstring = String.Empty;
928 932
929 using (MemoryStream buffer = new MemoryStream()) 933 using (MemoryStream buffer = new MemoryStream())
@@ -1051,6 +1055,7 @@ namespace OpenSim.Framework
1051 1055
1052 WebRequest request = WebRequest.Create(requestUrl); 1056 WebRequest request = WebRequest.Create(requestUrl);
1053 request.Method = verb; 1057 request.Method = verb;
1058 request.Proxy = null;
1054 MemoryStream buffer = null; 1059 MemoryStream buffer = null;
1055 1060
1056 if ((verb == "POST") || (verb == "PUT")) 1061 if ((verb == "POST") || (verb == "PUT"))