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

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

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

902件の閲覧回数
lpcware
NXP Employee
NXP Employee
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.
ラベル(1)
0 件の賞賛
返信
1 返信

865件の閲覧回数
fxois
Contributor I

Hello,

I encounter the exactly same problem, did you find a solution by any chance ?

 

Thank you,

 

Fxois

0 件の賞賛
返信