diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/WebUtil.cs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs index be7504f..971c0b7 100644 --- a/OpenSim/Framework/WebUtil.cs +++ b/OpenSim/Framework/WebUtil.cs | |||
@@ -245,6 +245,7 @@ namespace OpenSim.Framework | |||
245 | catch (Exception ex) | 245 | catch (Exception ex) |
246 | { | 246 | { |
247 | errorMessage = ex.Message; | 247 | errorMessage = ex.Message; |
248 | m_log.Debug("[WEB UTIL]: Exception making request: " + ex.ToString()); | ||
248 | } | 249 | } |
249 | finally | 250 | finally |
250 | { | 251 | { |
@@ -311,7 +312,7 @@ namespace OpenSim.Framework | |||
311 | /// </summary> | 312 | /// </summary> |
312 | public static OSDMap PostToService(string url, NameValueCollection data) | 313 | public static OSDMap PostToService(string url, NameValueCollection data) |
313 | { | 314 | { |
314 | return ServiceFormRequest(url,data,10000); | 315 | return ServiceFormRequest(url,data, 20000); |
315 | } | 316 | } |
316 | 317 | ||
317 | public static OSDMap ServiceFormRequest(string url, NameValueCollection data, int timeout) | 318 | public static OSDMap ServiceFormRequest(string url, NameValueCollection data, int timeout) |
@@ -925,11 +926,18 @@ namespace OpenSim.Framework | |||
925 | /// the request. You'll want to make sure you deal with this as they're not uncommon</exception> | 926 | /// the request. You'll want to make sure you deal with this as they're not uncommon</exception> |
926 | public static TResponse MakeRequest<TRequest, TResponse>(string verb, string requestUrl, TRequest obj) | 927 | public static TResponse MakeRequest<TRequest, TResponse>(string verb, string requestUrl, TRequest obj) |
927 | { | 928 | { |
929 | return MakeRequest<TRequest, TResponse>(verb, requestUrl, obj, 0); | ||
930 | } | ||
931 | |||
932 | public static TResponse MakeRequest<TRequest, TResponse>(string verb, string requestUrl, TRequest obj, int pTimeout) | ||
933 | { | ||
928 | Type type = typeof(TRequest); | 934 | Type type = typeof(TRequest); |
929 | TResponse deserial = default(TResponse); | 935 | TResponse deserial = default(TResponse); |
930 | 936 | ||
931 | WebRequest request = WebRequest.Create(requestUrl); | 937 | WebRequest request = WebRequest.Create(requestUrl); |
932 | request.Method = verb; | 938 | request.Method = verb; |
939 | if (pTimeout != 0) | ||
940 | request.Timeout = pTimeout * 1000; | ||
933 | 941 | ||
934 | if ((verb == "POST") || (verb == "PUT")) | 942 | if ((verb == "POST") || (verb == "PUT")) |
935 | { | 943 | { |