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 d2aa538..11967c9 100644 --- a/OpenSim/Framework/WebUtil.cs +++ b/OpenSim/Framework/WebUtil.cs | |||
@@ -205,6 +205,7 @@ namespace OpenSim.Framework | |||
205 | catch (Exception ex) | 205 | catch (Exception ex) |
206 | { | 206 | { |
207 | errorMessage = ex.Message; | 207 | errorMessage = ex.Message; |
208 | m_log.Debug("[WEB UTIL]: Exception making request: " + ex.ToString()); | ||
208 | } | 209 | } |
209 | finally | 210 | finally |
210 | { | 211 | { |
@@ -277,7 +278,7 @@ namespace OpenSim.Framework | |||
277 | /// </summary> | 278 | /// </summary> |
278 | public static OSDMap PostToService(string url, NameValueCollection data) | 279 | public static OSDMap PostToService(string url, NameValueCollection data) |
279 | { | 280 | { |
280 | return ServiceFormRequest(url,data,10000); | 281 | return ServiceFormRequest(url,data, 20000); |
281 | } | 282 | } |
282 | 283 | ||
283 | public static OSDMap ServiceFormRequest(string url, NameValueCollection data, int timeout) | 284 | public static OSDMap ServiceFormRequest(string url, NameValueCollection data, int timeout) |
@@ -915,11 +916,18 @@ namespace OpenSim.Framework | |||
915 | /// the request. You'll want to make sure you deal with this as they're not uncommon</exception> | 916 | /// the request. You'll want to make sure you deal with this as they're not uncommon</exception> |
916 | public static TResponse MakeRequest<TRequest, TResponse>(string verb, string requestUrl, TRequest obj) | 917 | public static TResponse MakeRequest<TRequest, TResponse>(string verb, string requestUrl, TRequest obj) |
917 | { | 918 | { |
919 | return MakeRequest<TRequest, TResponse>(verb, requestUrl, obj, 0); | ||
920 | } | ||
921 | |||
922 | public static TResponse MakeRequest<TRequest, TResponse>(string verb, string requestUrl, TRequest obj, int pTimeout) | ||
923 | { | ||
918 | Type type = typeof(TRequest); | 924 | Type type = typeof(TRequest); |
919 | TResponse deserial = default(TResponse); | 925 | TResponse deserial = default(TResponse); |
920 | 926 | ||
921 | WebRequest request = WebRequest.Create(requestUrl); | 927 | WebRequest request = WebRequest.Create(requestUrl); |
922 | request.Method = verb; | 928 | request.Method = verb; |
929 | if (pTimeout != 0) | ||
930 | request.Timeout = pTimeout * 1000; | ||
923 | 931 | ||
924 | if ((verb == "POST") || (verb == "PUT")) | 932 | if ((verb == "POST") || (verb == "PUT")) |
925 | { | 933 | { |