diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Servers/BaseHttpServer.cs | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs index fa64b41..50e2c0c 100644 --- a/OpenSim/Framework/Servers/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/BaseHttpServer.cs | |||
@@ -310,19 +310,20 @@ namespace OpenSim.Framework.Servers | |||
310 | agentHandler = null; | 310 | agentHandler = null; |
311 | try | 311 | try |
312 | { | 312 | { |
313 | foreach(IHttpAgentHandler handler in m_agentHandlers.Values) | 313 | foreach (IHttpAgentHandler handler in m_agentHandlers.Values) |
314 | { | 314 | { |
315 | if(handler.Match(request, response)) | 315 | if (handler.Match(request, response)) |
316 | { | 316 | { |
317 | agentHandler = handler; | 317 | agentHandler = handler; |
318 | return true; | 318 | return true; |
319 | } | 319 | } |
320 | } | 320 | } |
321 | } | 321 | } |
322 | catch(KeyNotFoundException) {} | 322 | catch(KeyNotFoundException) |
323 | { | ||
324 | } | ||
323 | 325 | ||
324 | return false; | 326 | return false; |
325 | |||
326 | } | 327 | } |
327 | 328 | ||
328 | /// <summary> | 329 | /// <summary> |
@@ -478,7 +479,6 @@ namespace OpenSim.Framework.Servers | |||
478 | 479 | ||
479 | private bool HandleAgentRequest(IHttpAgentHandler handler, OSHttpRequest request, OSHttpResponse response) | 480 | private bool HandleAgentRequest(IHttpAgentHandler handler, OSHttpRequest request, OSHttpResponse response) |
480 | { | 481 | { |
481 | |||
482 | // In the case of REST, then handler is responsible for ALL aspects of | 482 | // In the case of REST, then handler is responsible for ALL aspects of |
483 | // the request/response handling. Nothing is done here, not even encoding. | 483 | // the request/response handling. Nothing is done here, not even encoding. |
484 | 484 | ||
@@ -500,11 +500,12 @@ namespace OpenSim.Framework.Servers | |||
500 | response.StatusCode = (int)OSHttpStatusCode.ServerErrorInternalError; | 500 | response.StatusCode = (int)OSHttpStatusCode.ServerErrorInternalError; |
501 | response.OutputStream.Close(); | 501 | response.OutputStream.Close(); |
502 | } | 502 | } |
503 | catch(Exception){} | 503 | catch(Exception) |
504 | { | ||
505 | } | ||
504 | } | 506 | } |
505 | 507 | ||
506 | return true; | 508 | return true; |
507 | |||
508 | } | 509 | } |
509 | 510 | ||
510 | public void HandleHTTPRequest(OSHttpRequest request, OSHttpResponse response) | 511 | public void HandleHTTPRequest(OSHttpRequest request, OSHttpResponse response) |
@@ -759,13 +760,16 @@ namespace OpenSim.Framework.Servers | |||
759 | { | 760 | { |
760 | try | 761 | try |
761 | { | 762 | { |
762 | if(handler == m_agentHandlers[agent]) | 763 | if (handler == m_agentHandlers[agent]) |
763 | { | 764 | { |
764 | m_agentHandlers.Remove(agent); | 765 | m_agentHandlers.Remove(agent); |
765 | return true; | 766 | return true; |
766 | } | 767 | } |
767 | } | 768 | } |
768 | catch(KeyNotFoundException) {} | 769 | catch(KeyNotFoundException) |
770 | { | ||
771 | } | ||
772 | |||
769 | return false; | 773 | return false; |
770 | } | 774 | } |
771 | 775 | ||