AnsweredAssumed Answered

MQX 4.1 HTTPSRV_cgi_write unhandled exception

Question asked by Justin Ancheta on May 28, 2015
Latest reply on Jun 8, 2015 by Daniel Chen

I have recently run into an issue when I call HTTPSRV_cgi_write. An unhandled exception occurs seemingly at _task_block.

Call Stack:


I basically followed what I found in the web_hvac example and my function that calls HTTPSRV_cgi_write (s32_CGI_Post_Nav) never gets to its return statement


Code snippet from s32_CGI_Post_Nav




st_Response.ses_handle = pst_Param->ses_handle;

st_Response.content_type = HTTPSRV_CONTENT_TYPE_HTML;

st_Response.status_code = 200; = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">"

"<html><head><title>Navigation NONE Response</title>"

"<meta http-equiv=\"REFRESH\" content=\"0;url=index.html\"></head>\n<body>\n"


st_Response.data_length = strlen( );

st_Response.content_length = 0;

HTTPSRV_cgi_write( &st_Response );

return ( st_Response.content_length );


I am ultimately trying to reload a certain page after a form post but nothing is ever getting sent back to the browser.


I do a HTTPSRV_cgi_read before setting the response and i have verified all data has been read.


I am using the K64 Freedom Board. CPU: MK64FN1M0VLL12