diff options
author | Sean McNamara | 2011-05-02 02:23:18 -0400 |
---|---|---|
committer | Sean McNamara | 2011-05-02 02:23:18 -0400 |
commit | fffd42f5cbbb9e59b6fde3247aeb0d80d990319f (patch) | |
tree | 034b3e8da351954bc1124d91ec1f28e29e6a68c6 /OpenSim/Framework/WebUtil.cs | |
parent | First pass at fixing justincc's feedback v2 ( http://opensimulator.org/mantis... (diff) | |
parent | Fixed confusing OSDMap that comes as the response of QueryAccess in the case ... (diff) | |
download | opensim-SC_OLD-fffd42f5cbbb9e59b6fde3247aeb0d80d990319f.zip opensim-SC_OLD-fffd42f5cbbb9e59b6fde3247aeb0d80d990319f.tar.gz opensim-SC_OLD-fffd42f5cbbb9e59b6fde3247aeb0d80d990319f.tar.bz2 opensim-SC_OLD-fffd42f5cbbb9e59b6fde3247aeb0d80d990319f.tar.xz |
Merge git://opensimulator.org/git/opensim
Diffstat (limited to 'OpenSim/Framework/WebUtil.cs')
-rw-r--r-- | OpenSim/Framework/WebUtil.cs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs index 9d70f63..ac0828b 100644 --- a/OpenSim/Framework/WebUtil.cs +++ b/OpenSim/Framework/WebUtil.cs | |||
@@ -142,17 +142,17 @@ namespace OpenSim.Framework | |||
142 | /// </summary> | 142 | /// </summary> |
143 | public static OSDMap PutToService(string url, OSDMap data) | 143 | public static OSDMap PutToService(string url, OSDMap data) |
144 | { | 144 | { |
145 | return ServiceOSDRequest(url,data,"PUT",10000); | 145 | return ServiceOSDRequest(url,data,"PUT",30000); |
146 | } | 146 | } |
147 | 147 | ||
148 | public static OSDMap PostToService(string url, OSDMap data) | 148 | public static OSDMap PostToService(string url, OSDMap data) |
149 | { | 149 | { |
150 | return ServiceOSDRequest(url,data,"POST",10000); | 150 | return ServiceOSDRequest(url,data,"POST",30000); |
151 | } | 151 | } |
152 | 152 | ||
153 | public static OSDMap GetFromService(string url) | 153 | public static OSDMap GetFromService(string url) |
154 | { | 154 | { |
155 | return ServiceOSDRequest(url,null,"GET",10000); | 155 | return ServiceOSDRequest(url,null,"GET",30000); |
156 | } | 156 | } |
157 | 157 | ||
158 | public static OSDMap ServiceOSDRequest(string url, OSDMap data, string method, int timeout) | 158 | public static OSDMap ServiceOSDRequest(string url, OSDMap data, string method, int timeout) |
@@ -171,15 +171,15 @@ namespace OpenSim.Framework | |||
171 | request.Timeout = timeout; | 171 | request.Timeout = timeout; |
172 | request.KeepAlive = false; | 172 | request.KeepAlive = false; |
173 | request.MaximumAutomaticRedirections = 10; | 173 | request.MaximumAutomaticRedirections = 10; |
174 | request.ReadWriteTimeout = timeout / 4; | 174 | request.ReadWriteTimeout = timeout * 8; |
175 | request.Headers[OSHeaderRequestID] = reqnum.ToString(); | 175 | request.Headers[OSHeaderRequestID] = reqnum.ToString(); |
176 | 176 | ||
177 | // If there is some input, write it into the request | 177 | // If there is some input, write it into the request |
178 | if (data != null) | 178 | if (data != null) |
179 | { | 179 | { |
180 | string strBuffer = OSDParser.SerializeJsonString(data); | 180 | string strBuffer = OSDParser.SerializeJsonString(data); |
181 | byte[] buffer = System.Text.Encoding.UTF8.GetBytes(strBuffer); | 181 | byte[] buffer = System.Text.Encoding.UTF8.GetBytes(strBuffer); |
182 | 182 | ||
183 | request.ContentType = "application/json"; | 183 | request.ContentType = "application/json"; |
184 | request.ContentLength = buffer.Length; //Count bytes to send | 184 | request.ContentLength = buffer.Length; //Count bytes to send |
185 | using (Stream requestStream = request.GetRequestStream()) | 185 | using (Stream requestStream = request.GetRequestStream()) |