Actually, I think it's not the library but the application code should trigger the header of HTTP message.
For a cgi web page, application callback functions are defined in HTTPD_CGI_LINK_STRUCT.
From the cgi callback function, we can request the RTCS to send a header. An example for this in MQX 4.0, in /rtcs/examples/httpsrv/cgi.c, cgi callback functions should look like this:
static _mqx_int cgi_rtc_data(HTTPD_SESSION_STRUCT *session)
{
TIME_STRUCT time;
int min, hour;
_time_get(&time);
min = time.SECONDS / 60;
hour = min / 60;
min %= 60;
session->response.contenttype = CONTENT_TYPE_PLAIN;
httpd_sendhdr(session, 0, 0);
CGI_SEND_NUM(hour);
CGI_SEND_NUM(min);
CGI_SEND_NUM(time.SECONDS % 60);
return session->request.content_len;
}
Notice the write to response struct contenttype and a call to httpd_sendhdr().