websUrlHandlerDelete GoAhead WebServer API GoAhead EMF

Synopsis

Delete an existing URL handler

Prototype

#include "webs.h"
   	       
int websUrlHandlerDelete(int (*fn)(webs_t wp, char_t *handler, 
	char_t *path, char_t *query), int flags);

Parameters

wp Web server connection handle
url Request URL
path Request path portion of the URL
query Query string portion of the URL
flags Specify a sorting value to modify the calling order of the handler

Description

The websUrlHandlerDelete procedure is used to delete existing URL handlers. This is useful when you wish to replace a URL handler with a new version, such as replacing the security handler.

If multiple handlers have been defined for one function, only the first encountered will be removed.

Return Value

Returns 0 if successful. Otherwise returns -1 if the handler was not found.

Example

int myHandler(webs_t wp, char_t *url, char_t *path, char_t *query) 
{
    /*
     *    Processing here
     */
          return 1;
}

websUrlHandlerDelete("", myHandler, WEBS_HANDLER_FIRST);

See Also

websUrlHandlerDefine websSecurityHandler