SSI server ACKs garbage value on browser, file->data returns packet header instead of file body

Discussion created by lpcware Employee on Jun 15, 2016
Content originally posted in LPCWare by rishitborad on Tue Jul 28 02:14:54 MST 2015
I've written the handler for SSI file and creted .ssi file with ssi tag in it on SD card.

While I am trying to call the .ssi file from html page it gives me garbage values.

Digging further I realized that in httpd.c  'fs_open' function is returning structure pointer to 'file' variable and when I read the 'file->data' it shows the header.

HTTP/1.0 200 OK
Server: lwIP/1.3.1 (http://savannah.nongnu.org/projects/lwip)
Content-type: text/html
Expires: Fri, 10 Apr 2008 14:00:00 GMT
Pragma: no-cache

I think it should be the content of my .ssi file(HTML syntax) stored in memory card, instead of the header, and program will parse the HTML syntax and find for the SSI tag inside it and replace it with *pcInsert.

C code----------------------------
const char * tag = "p";
const char** tag_p = &tag;

u16_t SSI_Pot_Handler(int iIndex, char *pcInsert, int iInsertLen){
DEBUGOUT("in SSI Handler\n");
if(iIndex == 0){
*pcInsert = "50";     //I just want this string on web-browser for now
return 2;
return 0;

Thanks for your time.