aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/WebUtil.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/WebUtil.cs10
1 files changed, 9 insertions, 1 deletions
diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs
index ead8f46..aac575c 100644
--- a/OpenSim/Framework/WebUtil.cs
+++ b/OpenSim/Framework/WebUtil.cs
@@ -206,6 +206,7 @@ namespace OpenSim.Framework
206 catch (Exception ex) 206 catch (Exception ex)
207 { 207 {
208 errorMessage = ex.Message; 208 errorMessage = ex.Message;
209 m_log.Debug("[WEB UTIL]: Exception making request: " + ex.ToString());
209 } 210 }
210 finally 211 finally
211 { 212 {
@@ -276,7 +277,7 @@ namespace OpenSim.Framework
276 /// </summary> 277 /// </summary>
277 public static OSDMap PostToService(string url, NameValueCollection data) 278 public static OSDMap PostToService(string url, NameValueCollection data)
278 { 279 {
279 return ServiceFormRequest(url,data,10000); 280 return ServiceFormRequest(url,data, 20000);
280 } 281 }
281 282
282 public static OSDMap ServiceFormRequest(string url, NameValueCollection data, int timeout) 283 public static OSDMap ServiceFormRequest(string url, NameValueCollection data, int timeout)
@@ -905,11 +906,18 @@ namespace OpenSim.Framework
905 /// the request. You'll want to make sure you deal with this as they're not uncommon</exception> 906 /// the request. You'll want to make sure you deal with this as they're not uncommon</exception>
906 public static TResponse MakeRequest<TRequest, TResponse>(string verb, string requestUrl, TRequest obj) 907 public static TResponse MakeRequest<TRequest, TResponse>(string verb, string requestUrl, TRequest obj)
907 { 908 {
909 return MakeRequest<TRequest, TResponse>(verb, requestUrl, obj, 0);
910 }
911
912 public static TResponse MakeRequest<TRequest, TResponse>(string verb, string requestUrl, TRequest obj, int pTimeout)
913 {
908 Type type = typeof(TRequest); 914 Type type = typeof(TRequest);
909 TResponse deserial = default(TResponse); 915 TResponse deserial = default(TResponse);
910 916
911 WebRequest request = WebRequest.Create(requestUrl); 917 WebRequest request = WebRequest.Create(requestUrl);
912 request.Method = verb; 918 request.Method = verb;
919 if (pTimeout != 0)
920 request.Timeout = pTimeout * 1000;
913 921
914 if ((verb == "POST") || (verb == "PUT")) 922 if ((verb == "POST") || (verb == "PUT"))
915 { 923 {