Respone Headers MIME-TYPE (CSS not working in IE9 - WeOnlyDo Discussion board

Respone Headers MIME-TYPE (CSS not working in IE9 (wodWebServer / wodWebServer.NET)

by Cyberlex, Thursday, May 09, 2013, 13:01 (2622 days ago)


I was doing some first tests with your Web Server component and I started using a very simple Web Server pointing to my file structure:

Imports WeOnlyDo.Server
Dim WithEvents mys As New WebServer
mys.DocumentRoot = C:tempwget
mys.DefaultPage = index.html
mys.ServerName = EWS
mys.BindIP =
mys.AllowBrowsing = True

My Index page contains both links to external .js and .css files to be included.

In IE8 it was displaying correctly, in IE9/10 it was not. IE in dev mode told me that the CSS got ignored (SEC7113: CSS was ignored due to mime type mismatch)

I then traced the answers your web component is composing with Wireshark and I saw that your auto-generated Response Headers do NOT contain the content-type . This is causing a Problem in IE9 and newer, as they changed the MIME type handling (read here, see SEC7113 in the table:

I worked around it by using your components RequestHeadersDoneEvent, Looping trough the args.user.request.headers to see if I can find a content-type Name/value. If yes, I manuall add the same mime type to the Response Header: Args.User.Response.Headers.Add( content-Type , <same as in request Header> )

To be honest I would actually expect your component to include the correct content-type in the Response Header to match the one in the request Header for any mime type.

Thank you very much & best regards,

Complete thread: