Hi Tom
I suspect that IE9 is being very strict with the content type.
Originally the browsers accepted HTTP without having a header returned but this changed with CHROME which wouldn't accept any HTML when it wasn't served with a header, leading to the support for a minimum header when the define SUPPORT_CHROME is set.
Newer versions of IE however didn't display text files correctly (CR and LF would not be shown) and so it was found that extra content type needed to be added to the header - define HTTP_HEADER_CONTENT_INFO.
It sounds as though IE9 versions now won't interpret .css unless its content type is explicitly declared and I expect that the following could solve it:
In http.c:
static unsigned short fnGenerateHTTP_header(unsigned char *pucTCP_Message, HTTP *http_session, unsigned char *ptrPush, int iRepeat)
uMemcpy(pucTCP_Message, cucHTTP_header, SIMPLE_HTTP_HEADER_LENGTH); // copy the HTTP header to start of each file to be transferred
if (PLAIN_TEXTCONTENT(http_session->ucMimeType)) { // check whether this type should be declared as plain text content
uMemcpy((pucTCP_Message + (SIMPLE_HTTP_HEADER_LENGTH - 2)), cucHTTP_plain_text, TEXT_PLAIN_HTTP_HEADER_LENGTH);
usHTTP_HeaderLength += (TEXT_PLAIN_HTTP_HEADER_LENGTH - 2);
}
This is adding "Content-Type: text/plain\r\n\r\n" to the header when the file type is plain text (as opposed to html where white space will be ignored by the browser).
By adding
else if (http_session->ucMimeType == MIME_CSS) { // check whether this type should be declared as css content
uMemcpy((pucTCP_Message + (SIMPLE_HTTP_HEADER_LENGTH - 2)), cucHTTP_css, CSS_HTTP_HEADER_LENGTH);
usHTTP_HeaderLength += (CSS_PLAIN_HTTP_HEADER_LENGTH - 2);
}
where
static const CHAR cucHTTP_css[] = "Content-Type: text/css\r\n\r\n";
#define CSS_PLAIN_HTTP_HEADER_LENGTH (sizeof(cucHTTP_css) - 1)
it would declare the css content type accordingly and presumably allow the css content to be correctly interpreted by the browser.
Regards
Mark