websUrlHandlerDelete GoAhead WebServer API GoAhead EMF

Synopsis

Delete an existing URL handler.

Prototype

 #include "webs.h" 
 
 int websUrlHandlerDelete(int (*handler)(webs_t wp, char_t *urlPrefix, 
     char_t *webDir, int arg, char_t *url, char_t *path, char_t *query)) 

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 deletes 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);

Stability Classification

Stable.

See Also

websUrlHandlerDefine, websSecurityHandler