AnsweredAssumed Answered

SSI callbacks not working

Question asked by seandema on Jul 18, 2014
Latest reply on Jul 22, 2014 by seandema

I'm attempting to test the SSI callback capability of the MQX web server. I had this working under MQX 4.0 but I can't get it to work under 4.1. I'm using the same code and web page I used in 4.0 so I'm really not sure why it doesn't work.

I have created the SSI function, link table, and am passing that into the web server.


const HTTPSRV_SSI_LINK_STRUCT ssi_tbl[] = {
  { "ssiTest", ssi_test},
  { 0, 0} // DO NOT REMOVE - last item - end of table

static _mqx_int ssi_test(HTTPSRV_SSI_PARAM_STRUCT* param) 
   printf("SSI test func called\n");


HTTPSRV_PARAM_STRUCT                 web_srv_params;
  extern const HTTPSRV_CGI_LINK_STRUCT cgi_tbl[];
  extern const HTTPSRV_SSI_LINK_STRUCT ssi_tbl[];

  _mem_zero(&web_srv_params, sizeof(HTTPSRV_PARAM_STRUCT)); = AF_INET; 
    web_srv_params.root_dir = "tfs:";
  web_srv_params.index_page = "\\WebTest3.shtml";
  web_srv_params.max_ses = 1;
  web_srv_params.use_nagle = FALSE;  
  web_srv_params.script_stack = 2750;     
  web_srv_params.server_prio = 7;
  web_srv_params.script_prio = 7;  
  web_srv_params.cgi_lnk_tbl = (HTTPSRV_CGI_LINK_STRUCT*) cgi_tbl;
  web_srv_params.ssi_lnk_tbl = (HTTPSRV_SSI_LINK_STRUCT*) ssi_tbl;

  return (HTTPSRV_init(&web_srv_params));


I have my HTML file named as a .shtml file. I have SSI calls in my HTML code in the format specified in the RTCS users guide.

<% ssiTest:parameter %>


When I load the web page it just appears to skip right over the SSI and never calls my C code function.


Does anyone have any idea why this doesn't work? It's probably something simple I'm missing since it used to work in MQX 4.0.