AnsweredAssumed Answered

MQX 4.1 HTTPSRV: How to modify the reponse header?

Question asked by pbanta on Oct 10, 2014
Latest reply on Oct 13, 2014 by pbanta

I'm working on updating a project from MQX 3.8.1 to MQX 4.1.  The most major change is the new HTTPSRV API and the associated changes.  With the old HTTPD server I was able to modify the response header like so:


/* Send the reply */
session->response.contenttype = CONTENT_TYPE_HTML;
session->response.statuscode = 302;
strncat(session->response.header, "Location: control.html\n", HTTPDCFG_MAX_HEADER_LEN);
httpd_sendhdr(session, 0, 0);


How can do the same with MQX 4.1?  session->response no longer has a header field.