diff options
author | Teravus Ovares | 2008-10-01 04:26:51 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-10-01 04:26:51 +0000 |
commit | 6754681e5b775a2ae33d6dca4fd155c81d6ac070 (patch) | |
tree | ae4a4e2c3e26ffad042556765e9eb648358fdb3e /OpenSim/Framework/Servers/OSHttpRequest.cs | |
parent | * Fixed a mangled Seed caps handler definition on login to region in standalo... (diff) | |
download | opensim-SC_OLD-6754681e5b775a2ae33d6dca4fd155c81d6ac070.zip opensim-SC_OLD-6754681e5b775a2ae33d6dca4fd155c81d6ac070.tar.gz opensim-SC_OLD-6754681e5b775a2ae33d6dca4fd155c81d6ac070.tar.bz2 opensim-SC_OLD-6754681e5b775a2ae33d6dca4fd155c81d6ac070.tar.xz |
* Adds error handlers for errors parsing the querystring passed on the OSHttpRequest constructor.
* maybe.. it was a key that was null. Obviously you can't still a null key in a string key'ed collection.
Diffstat (limited to 'OpenSim/Framework/Servers/OSHttpRequest.cs')
-rw-r--r-- | OpenSim/Framework/Servers/OSHttpRequest.cs | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/OpenSim/Framework/Servers/OSHttpRequest.cs b/OpenSim/Framework/Servers/OSHttpRequest.cs index 28f4337..55c983d 100644 --- a/OpenSim/Framework/Servers/OSHttpRequest.cs +++ b/OpenSim/Framework/Servers/OSHttpRequest.cs | |||
@@ -221,10 +221,25 @@ namespace OpenSim.Framework.Servers | |||
221 | _userAgent = req.Headers["user-agent"]; | 221 | _userAgent = req.Headers["user-agent"]; |
222 | _queryString = new NameValueCollection(); | 222 | _queryString = new NameValueCollection(); |
223 | _query = new Hashtable(); | 223 | _query = new Hashtable(); |
224 | foreach (KeyValuePair<string, HttpInputItem> q in req.QueryString) | 224 | try |
225 | { | 225 | { |
226 | _queryString.Add(q.Key, q.Value.Value); | 226 | foreach (KeyValuePair<string, HttpInputItem> q in req.QueryString) |
227 | _query[q.Key] = q.Value.Value; | 227 | { |
228 | try | ||
229 | { | ||
230 | _queryString.Add(q.Key, q.Value.Value); | ||
231 | _query[q.Key] = q.Value.Value; | ||
232 | } | ||
233 | catch (InvalidCastException) | ||
234 | { | ||
235 | System.Console.WriteLine("[OSHttpRequest]: Errror parsing querystring.. but it was recoverable.. skipping on to the next one"); | ||
236 | continue; | ||
237 | } | ||
238 | } | ||
239 | } | ||
240 | catch (Exception) | ||
241 | { | ||
242 | System.Console.WriteLine("[OSHttpRequest]: Errror parsing querystring"); | ||
228 | } | 243 | } |
229 | // TODO: requires change to HttpServer.HttpRequest | 244 | // TODO: requires change to HttpServer.HttpRequest |
230 | _ipEndPoint = null; | 245 | _ipEndPoint = null; |