Sorry to dig up this old post, but I was having the same issues. Chrome and FF worked OK, but IE kept dying on me. Turns out that IE absolutely REQUIRES that the Content-Type be set for XML, and there is no way to fix this on the client side. Chrome and FF look for the MIME type, but fall back to the file extension, IE just dies without it.
Anyways, I followed mcosta's suggestion, but also had to add a section where the content type was to be written to the client.
I created a new MIME type in config.h, and added the following lines to http.c:
(line number approx 379)
#ifdef SUPPORT_CHROME // {34}
if (http_session->ucMimeType == MIME_XML) //PCK 12/21/2009 -- added XML type
uMemcpy(HTTP_Tx->ucTCP_Message, cucXML_header, SIMPLE_XML_HEADER_LENGTH); // copy the XML header
else
uMemcpy(HTTP_Tx->ucTCP_Message, cucHTTP_header, SIMPLE_HTTP_HEADER_LENGTH); // copy the HTTP header to start of each file to be transferred
fnGetParsFile(http_session->ptrFileStart, (HTTP_Tx->ucTCP_Message + SIMPLE_HTTP_HEADER_LENGTH), (usLen - SIMPLE_HTTP_HEADER_LENGTH)); // get a frame to send
http_session->ptrFileStart -= SIMPLE_HTTP_HEADER_LENGTH; // offset for the added header
#else
and
(line number approx 911)
#ifdef SUPPORT_CHROME // {34}
if (http_session->FilePoint == 0) // regeneration of first frame needs to be handled differently to insert the HTTP header
{
if (http_session->ucMimeType == MIME_XML) //PCK 12/21/2009 -- added XML type
uMemcpy(HTTP_Tx->ucTCP_Message, cucXML_header, SIMPLE_XML_HEADER_LENGTH); // copy the XML header
else
uMemcpy(HTTP_Tx->ucTCP_Message, cucHTTP_header, SIMPLE_HTTP_HEADER_LENGTH); // copy the HTTP header to start of each file to be transferred
fnGetParsFile((http_session->ptrFileStart + SIMPLE_HTTP_HEADER_LENGTH), (HTTP_Tx->ucTCP_Message + SIMPLE_HTTP_HEADER_LENGTH), (Len - SIMPLE_HTTP_HEADER_LENGTH)); // get a frame to send
}
else {
fnGetParsFile((http_session->ptrFileStart + http_session->FilePoint), HTTP_Tx->ucTCP_Message, Len);
}
#else
Just do a search on the two places the cucHTTP_header is used, and add/replace the code with the above.
Mark, perhaps it would be better to create a "generic" Content-Type handler???