aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Servers
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Servers/BaseHttpServer.cs27
1 files changed, 16 insertions, 11 deletions
diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs
index 170a653..4dc5994 100644
--- a/OpenSim/Framework/Servers/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/BaseHttpServer.cs
@@ -171,18 +171,20 @@ namespace OpenSim.Framework.Servers
171 OSHttpRequest request = new OSHttpRequest(context.Request); 171 OSHttpRequest request = new OSHttpRequest(context.Request);
172 OSHttpResponse response = new OSHttpResponse(context.Response); 172 OSHttpResponse response = new OSHttpResponse(context.Response);
173 173
174 // user agent based requests? not sure where this actually gets used from 174 // This is the REST agent interface. We require an agent to properly identify
175 if (request.UserAgent != null) 175 // itself. If the REST handler recognizes the prefix it will attempt to
176 { 176 // satisfy the request. If it is not recognizable, and no damage has occurred
177 IHttpAgentHandler agentHandler; 177 // the request can be passed through to the other handlers. This is a low
178 // probability event; if a request is matched it is normally expected to be
179 // handled
180
181 IHttpAgentHandler agentHandler;
178 182
179 if (TryGetAgentHandler(request, response, out agentHandler)) 183 if (TryGetAgentHandler(request, response, out agentHandler))
184 {
185 if (HandleAgentRequest(agentHandler, request, response))
180 { 186 {
181 if (HandleAgentRequest(agentHandler, request, response)) 187 return;
182 {
183 m_log.DebugFormat("[HTTP-AGENT] Handler located for {0}", request.UserAgent);
184 return;
185 }
186 } 188 }
187 } 189 }
188 190
@@ -508,7 +510,7 @@ namespace OpenSim.Framework.Servers
508 catch (Exception e) 510 catch (Exception e)
509 { 511 {
510 // If the handler did in fact close the stream, then this will blow 512 // If the handler did in fact close the stream, then this will blow
511 // chunks, so that that doesn;t disturb anybody we throw away any 513 // chunks. So that that doesn't disturb anybody we throw away any
512 // and all exceptions raised. We've done our best to release the 514 // and all exceptions raised. We've done our best to release the
513 // client. 515 // client.
514 try 516 try
@@ -524,7 +526,10 @@ namespace OpenSim.Framework.Servers
524 } 526 }
525 } 527 }
526 528
529 // Indicate that the request has been "handled"
530
527 return true; 531 return true;
532
528 } 533 }
529 534
530 public void HandleHTTPRequest(OSHttpRequest request, OSHttpResponse response) 535 public void HandleHTTPRequest(OSHttpRequest request, OSHttpResponse response)