tfHttpdUserRegisterSsiTag

Jump to: navigation, search

Table of Contents >> Application Reference >> Web Server


#include <trsocket.h>


int tfHttpdUserRegisterSsiTag (
ttHttpdUserSrvHandle userSrvHandle,
ttUserConstCharPtr tagPtr,
ttHttpdUserSsiHandler handler
);


Function Description

To register a user defined SSI tag string and the associated handler function to handle that SSI tag. When the web server finds an instance of the tag in an SSI file while serving it, the registered handler function will be called with the entire mull terminated tag string. For example, if the registered tag string is
!--#cust
An instance of
<!--#cust sendfile readme.htm disableoutput>

would be passed to the SSI handler if it appears in a SSI file being served.


Parameters

  • userSrvHandle
    Handle to the HTTP server
  • tagPtr
    A pointer to a null terminated string that is associated with a user-defined SSI tag handler of type ttHttpdUserSsiHandler. According to the above example, this parameter would point to "!--#cust"


Returns

  • TM_ENOERROR
    no error
  • TM_EINVAL
    Either tagPtr or handler is NULL, or userSrvHandle is invalid.
  • TM_EPERM
    Too many tags registered.
  • TM_ENOBUFS
    No memory available to store the tag.


Table of Contents >> Application Reference >> Web Server