From 2313d14acbf0f23d5d041ade03fa1fe030223f51 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Thu, 11 Mar 2010 23:33:55 +0000
Subject: minor: add some more documentation for IHttpServer.AddHTTPHandler()
to tell the caller that the best match for an incoming request URI is invoked
---
OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | 6 ++----
OpenSim/Framework/Servers/HttpServer/Interfaces/IHttpServer.cs | 6 +++++-
2 files changed, 7 insertions(+), 5 deletions(-)
(limited to 'OpenSim/Framework')
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
index 214f936..9a6ef77 100644
--- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
@@ -202,16 +202,14 @@ namespace OpenSim.Framework.Servers.HttpServer
if (!m_pollHandlers.ContainsKey(methodName))
{
m_pollHandlers.Add(methodName,args);
- pollHandlerResult = true;
-
+ pollHandlerResult = true;
}
}
if (pollHandlerResult)
return AddHTTPHandler(methodName, handler);
- return false;
-
+ return false;
}
// Note that the agent string is provided simply to differentiate
diff --git a/OpenSim/Framework/Servers/HttpServer/Interfaces/IHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/Interfaces/IHttpServer.cs
index 5ee2045..65b1eb5 100644
--- a/OpenSim/Framework/Servers/HttpServer/Interfaces/IHttpServer.cs
+++ b/OpenSim/Framework/Servers/HttpServer/Interfaces/IHttpServer.cs
@@ -47,7 +47,7 @@ namespace OpenSim.Framework.Servers.HttpServer
bool AddAgentHandler(string agent, IHttpAgentHandler handler);
///
- /// Add a handler for an HTTP request
+ /// Add a handler for an HTTP request.
///
///
/// This handler can actually be invoked either as
@@ -66,6 +66,10 @@ namespace OpenSim.Framework.Servers.HttpServer
/// or
///
/// http://localhost:9000/object/
+ ///
+ /// In addition, the handler invoked by the HTTP server for any request is the one when best matches the request
+ /// URI. So if a handler for "/myapp/" is registered and a request for "/myapp/page" is received, then
+ /// the "/myapp/" handler is invoked if no "/myapp/page" handler exists.
///
///
///
--
cgit v1.1