diff options
Diffstat (limited to 'OpenSim/Framework/WebUtil.cs')
-rw-r--r-- | OpenSim/Framework/WebUtil.cs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs index 2aa4af5..6a40cd5 100644 --- a/OpenSim/Framework/WebUtil.cs +++ b/OpenSim/Framework/WebUtil.cs | |||
@@ -223,6 +223,7 @@ namespace OpenSim.Framework | |||
223 | catch (Exception ex) | 223 | catch (Exception ex) |
224 | { | 224 | { |
225 | errorMessage = ex.Message; | 225 | errorMessage = ex.Message; |
226 | m_log.Debug("[WEB UTIL]: Exception making request: " + ex.ToString()); | ||
226 | } | 227 | } |
227 | finally | 228 | finally |
228 | { | 229 | { |
@@ -302,7 +303,7 @@ namespace OpenSim.Framework | |||
302 | /// </summary> | 303 | /// </summary> |
303 | public static OSDMap PostToService(string url, NameValueCollection data) | 304 | public static OSDMap PostToService(string url, NameValueCollection data) |
304 | { | 305 | { |
305 | return ServiceFormRequest(url,data,10000); | 306 | return ServiceFormRequest(url,data, 20000); |
306 | } | 307 | } |
307 | 308 | ||
308 | public static OSDMap ServiceFormRequest(string url, NameValueCollection data, int timeout) | 309 | public static OSDMap ServiceFormRequest(string url, NameValueCollection data, int timeout) |
@@ -997,6 +998,11 @@ namespace OpenSim.Framework | |||
997 | /// the request. You'll want to make sure you deal with this as they're not uncommon</exception> | 998 | /// the request. You'll want to make sure you deal with this as they're not uncommon</exception> |
998 | public static TResponse MakeRequest<TRequest, TResponse>(string verb, string requestUrl, TRequest obj) | 999 | public static TResponse MakeRequest<TRequest, TResponse>(string verb, string requestUrl, TRequest obj) |
999 | { | 1000 | { |
1001 | return MakeRequest<TRequest, TResponse>(verb, requestUrl, obj, 0); | ||
1002 | } | ||
1003 | |||
1004 | public static TResponse MakeRequest<TRequest, TResponse>(string verb, string requestUrl, TRequest obj, int pTimeout) | ||
1005 | { | ||
1000 | int reqnum = WebUtil.RequestNumber++; | 1006 | int reqnum = WebUtil.RequestNumber++; |
1001 | // m_log.DebugFormat("[WEB UTIL]: <{0}> start osd request for {1}, method {2}",reqnum,url,method); | 1007 | // m_log.DebugFormat("[WEB UTIL]: <{0}> start osd request for {1}, method {2}",reqnum,url,method); |
1002 | 1008 | ||
@@ -1008,6 +1014,8 @@ namespace OpenSim.Framework | |||
1008 | 1014 | ||
1009 | WebRequest request = WebRequest.Create(requestUrl); | 1015 | WebRequest request = WebRequest.Create(requestUrl); |
1010 | request.Method = verb; | 1016 | request.Method = verb; |
1017 | if (pTimeout != 0) | ||
1018 | request.Timeout = pTimeout * 1000; | ||
1011 | MemoryStream buffer = null; | 1019 | MemoryStream buffer = null; |
1012 | 1020 | ||
1013 | if ((verb == "POST") || (verb == "PUT")) | 1021 | if ((verb == "POST") || (verb == "PUT")) |
@@ -1123,4 +1131,4 @@ namespace OpenSim.Framework | |||
1123 | return deserial; | 1131 | return deserial; |
1124 | } | 1132 | } |
1125 | } | 1133 | } |
1126 | } \ No newline at end of file | 1134 | } |