diff options
-rw-r--r-- | OpenSim/Framework/WebUtil.cs | 15 | ||||
-rw-r--r-- | OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs | 2 | ||||
-rw-r--r-- | OpenSim/Services/Connectors/Hypergrid/HGFriendsServicesConnector.cs | 5 |
3 files changed, 9 insertions, 13 deletions
diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs index 2bbf785..f927e69 100644 --- a/OpenSim/Framework/WebUtil.cs +++ b/OpenSim/Framework/WebUtil.cs | |||
@@ -1019,7 +1019,8 @@ namespace OpenSim.Framework | |||
1019 | /// | 1019 | /// |
1020 | /// <exception cref="System.Net.WebException">Thrown if we encounter a network issue while posting | 1020 | /// <exception cref="System.Net.WebException">Thrown if we encounter a network issue while posting |
1021 | /// the request. You'll want to make sure you deal with this as they're not uncommon</exception> | 1021 | /// the request. You'll want to make sure you deal with this as they're not uncommon</exception> |
1022 | public static string MakeRequest(string verb, string requestUrl, string obj, int timeoutsecs, IServiceAuth auth) | 1022 | public static string MakeRequest(string verb, string requestUrl, string obj, int timeoutsecs = -1, |
1023 | IServiceAuth auth = null, bool keepalive = true) | ||
1023 | { | 1024 | { |
1024 | int reqnum = WebUtil.RequestNumber++; | 1025 | int reqnum = WebUtil.RequestNumber++; |
1025 | 1026 | ||
@@ -1034,6 +1035,8 @@ namespace OpenSim.Framework | |||
1034 | request.Method = verb; | 1035 | request.Method = verb; |
1035 | if (timeoutsecs > 0) | 1036 | if (timeoutsecs > 0) |
1036 | request.Timeout = timeoutsecs * 1000; | 1037 | request.Timeout = timeoutsecs * 1000; |
1038 | if(!keepalive && request is HttpWebRequest) | ||
1039 | ((HttpWebRequest)request).KeepAlive = false; | ||
1037 | 1040 | ||
1038 | if (auth != null) | 1041 | if (auth != null) |
1039 | auth.AddAuthorization(request.Headers); | 1042 | auth.AddAuthorization(request.Headers); |
@@ -1125,16 +1128,6 @@ namespace OpenSim.Framework | |||
1125 | return respstring; | 1128 | return respstring; |
1126 | } | 1129 | } |
1127 | 1130 | ||
1128 | public static string MakeRequest(string verb, string requestUrl, string obj, int timeoutsecs) | ||
1129 | { | ||
1130 | return MakeRequest(verb, requestUrl, obj, timeoutsecs, null); | ||
1131 | } | ||
1132 | |||
1133 | public static string MakeRequest(string verb, string requestUrl, string obj) | ||
1134 | { | ||
1135 | return MakeRequest(verb, requestUrl, obj, -1); | ||
1136 | } | ||
1137 | |||
1138 | public static string MakeRequest(string verb, string requestUrl, string obj, IServiceAuth auth) | 1131 | public static string MakeRequest(string verb, string requestUrl, string obj, IServiceAuth auth) |
1139 | { | 1132 | { |
1140 | return MakeRequest(verb, requestUrl, obj, -1, auth); | 1133 | return MakeRequest(verb, requestUrl, obj, -1, auth); |
diff --git a/OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs b/OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs index 45f4514..74cd703 100644 --- a/OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs +++ b/OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs | |||
@@ -158,7 +158,7 @@ namespace OpenSim.Services.Connectors.Friends | |||
158 | 158 | ||
159 | try | 159 | try |
160 | { | 160 | { |
161 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString); | 161 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString, 15, null, false); |
162 | if (reply != string.Empty) | 162 | if (reply != string.Empty) |
163 | { | 163 | { |
164 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); | 164 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); |
diff --git a/OpenSim/Services/Connectors/Hypergrid/HGFriendsServicesConnector.cs b/OpenSim/Services/Connectors/Hypergrid/HGFriendsServicesConnector.cs index 622d4e1..8b31fa2 100644 --- a/OpenSim/Services/Connectors/Hypergrid/HGFriendsServicesConnector.cs +++ b/OpenSim/Services/Connectors/Hypergrid/HGFriendsServicesConnector.cs | |||
@@ -277,7 +277,10 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
277 | { | 277 | { |
278 | reply = SynchronousRestFormsRequester.MakeRequest("POST", | 278 | reply = SynchronousRestFormsRequester.MakeRequest("POST", |
279 | uri, | 279 | uri, |
280 | ServerUtils.BuildQueryString(sendData), 15); | 280 | ServerUtils.BuildQueryString(sendData), |
281 | 15, | ||
282 | null, | ||
283 | false); | ||
281 | } | 284 | } |
282 | catch (Exception e) | 285 | catch (Exception e) |
283 | { | 286 | { |