diff options
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/WebUtil.cs | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs index 3b73520..0970fd1 100644 --- a/OpenSim/Framework/WebUtil.cs +++ b/OpenSim/Framework/WebUtil.cs | |||
@@ -36,7 +36,6 @@ using System.Net; | |||
36 | using System.Net.Security; | 36 | using System.Net.Security; |
37 | using System.Reflection; | 37 | using System.Reflection; |
38 | using System.Text; | 38 | using System.Text; |
39 | using System.Threading; | ||
40 | using System.Web; | 39 | using System.Web; |
41 | using System.Xml; | 40 | using System.Xml; |
42 | using System.Xml.Serialization; | 41 | using System.Xml.Serialization; |
@@ -1092,7 +1091,7 @@ namespace OpenSim.Framework | |||
1092 | /// </returns> | 1091 | /// </returns> |
1093 | public static TResponse MakeRequest<TRequest, TResponse>(string verb, string requestUrl, TRequest obj) | 1092 | public static TResponse MakeRequest<TRequest, TResponse>(string verb, string requestUrl, TRequest obj) |
1094 | { | 1093 | { |
1095 | return MakeRequest<TRequest, TResponse>(verb, requestUrl, obj, Timeout.Infinite); | 1094 | return MakeRequest<TRequest, TResponse>(verb, requestUrl, obj, 0); |
1096 | } | 1095 | } |
1097 | 1096 | ||
1098 | /// <summary> | 1097 | /// <summary> |
@@ -1101,7 +1100,9 @@ namespace OpenSim.Framework | |||
1101 | /// <param name="verb"></param> | 1100 | /// <param name="verb"></param> |
1102 | /// <param name="requestUrl"></param> | 1101 | /// <param name="requestUrl"></param> |
1103 | /// <param name="obj"></param> | 1102 | /// <param name="obj"></param> |
1104 | /// <param name="pTimeout">Request timeout in milliseconds. Timeout.Infinite indicates no timeout.</param> | 1103 | /// <param name="pTimeout"> |
1104 | /// Request timeout in milliseconds. Timeout.Infinite indicates no timeout. If 0 is passed then the default HttpWebRequest timeout is used (100 seconds) | ||
1105 | /// </param> | ||
1105 | /// <returns> | 1106 | /// <returns> |
1106 | /// The response. If there was an internal exception or the request timed out, | 1107 | /// The response. If there was an internal exception or the request timed out, |
1107 | /// then the default(TResponse) is returned. | 1108 | /// then the default(TResponse) is returned. |
@@ -1117,7 +1118,9 @@ namespace OpenSim.Framework | |||
1117 | /// <param name="verb"></param> | 1118 | /// <param name="verb"></param> |
1118 | /// <param name="requestUrl"></param> | 1119 | /// <param name="requestUrl"></param> |
1119 | /// <param name="obj"></param> | 1120 | /// <param name="obj"></param> |
1120 | /// <param name="pTimeout">Request timeout in milliseconds. Timeout.Infinite indicates no timeout.</param> | 1121 | /// <param name="pTimeout"> |
1122 | /// Request timeout in milliseconds. Timeout.Infinite indicates no timeout. If 0 is passed then the default HttpWebRequest timeout is used (100 seconds) | ||
1123 | /// </param> | ||
1121 | /// <param name="maxConnections"></param> | 1124 | /// <param name="maxConnections"></param> |
1122 | /// <returns> | 1125 | /// <returns> |
1123 | /// The response. If there was an internal exception or the request timed out, | 1126 | /// The response. If there was an internal exception or the request timed out, |
@@ -1139,7 +1142,9 @@ namespace OpenSim.Framework | |||
1139 | 1142 | ||
1140 | WebRequest request = WebRequest.Create(requestUrl); | 1143 | WebRequest request = WebRequest.Create(requestUrl); |
1141 | HttpWebRequest ht = (HttpWebRequest)request; | 1144 | HttpWebRequest ht = (HttpWebRequest)request; |
1142 | ht.Timeout = pTimeout; | 1145 | |
1146 | if (pTimeout != 0) | ||
1147 | ht.Timeout = pTimeout; | ||
1143 | 1148 | ||
1144 | if (maxConnections > 0 && ht.ServicePoint.ConnectionLimit < maxConnections) | 1149 | if (maxConnections > 0 && ht.ServicePoint.ConnectionLimit < maxConnections) |
1145 | ht.ServicePoint.ConnectionLimit = maxConnections; | 1150 | ht.ServicePoint.ConnectionLimit = maxConnections; |