diff options
author | Diva Canto | 2011-05-01 09:11:16 -0700 |
---|---|---|
committer | Diva Canto | 2011-05-01 09:11:16 -0700 |
commit | f0bf64b6debf85440a823816b725dee7d41cedac (patch) | |
tree | ba4155810f2b27a8e3220214d92ecd7faa0cc069 /OpenSim/Framework/WebUtil.cs | |
parent | Added OpenSim.Capabilities.Handlers. For the moment it has only the GetTextur... (diff) | |
parent | Increased Timeout to 30 secs. (diff) | |
download | opensim-SC-f0bf64b6debf85440a823816b725dee7d41cedac.zip opensim-SC-f0bf64b6debf85440a823816b725dee7d41cedac.tar.gz opensim-SC-f0bf64b6debf85440a823816b725dee7d41cedac.tar.bz2 opensim-SC-f0bf64b6debf85440a823816b725dee7d41cedac.tar.xz |
Merge branch 'master' into caps
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()) |