* HttpRequestSignature uses regular expressions for the path now
* Added a simplified HttpListener.AddHandler() overload * Lots of improvements in ExtensionLoader, simplified interface * Updated Simian to latest ExtensionLoader git-svn-id: http://libopenmetaverse.googlecode.com/svn/trunk@2316 52acb1d6-8a22-11de-b505-999d5b087335
This commit is contained in:
@@ -86,6 +86,14 @@ namespace OpenMetaverse.Capabilities
|
||||
isRunning = false;
|
||||
}
|
||||
|
||||
public void AddHandler(string method, string path, HttpRequestCallback callback)
|
||||
{
|
||||
HttpRequestSignature signature = new HttpRequestSignature();
|
||||
signature.Method = method;
|
||||
signature.Path = path;
|
||||
AddHandler(new HttpRequestHandler(signature, callback));
|
||||
}
|
||||
|
||||
public void AddHandler(HttpRequestHandler handler)
|
||||
{
|
||||
if (!isRunning)
|
||||
@@ -148,7 +156,7 @@ namespace OpenMetaverse.Capabilities
|
||||
{
|
||||
HttpRequestHandler handler = requestHandlers[i];
|
||||
|
||||
if (handler.Signature == signature)
|
||||
if (signature == handler.Signature)
|
||||
{
|
||||
// Request signature matched, handle it
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user