Hi Paul,
it is no longer possible to modify a header of HTTP response directly. However in your case you can use a redirection in HTML using the http-equip attribute of the <meta> tag (see HTML meta http-equiv Attribute). And compose response using this tag in your CGI. Here is an example:
response.content_type = HTTPSRV_CONTENT_TYPE_HTML;
response.data = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">"
"<html><head><title>My Title</title>"
"<meta http-equiv=\"REFRESH\" content=\"0;url=my_uri.html\"></head>\n<body></body></html>";
response.data_length = strlen(response.data);
response.content_length = 0;
HTTPSRV_cgi_write(&response);
Edit:
Regarding the content length: If it is set to zero, HTTP server will signalize end of response entity by closing the connection and thus ignoring keep-alive flag of session.
Edit2:
In MQX 4.2 there will be support for chunked transmission encoding so you will not have to worry about content length.
Best regards,
Karel