I'm looking for ways to develop an extension for IE6 + that will handle custom MIME types.
As an example, I should be able to take a document with a custom MIME type that is returned by the server, do some processing on it, and then change the MIME type to something that IE can handle, like text / html or image / jpeg.
I am familiar with urlmon MIME filters, but they have a huge weakness; they are called only for a top-level document, and not for any additional page content, such as images, etc.
The only way I can think about this is to connect the HTTP / S protocol handlers using vtable / iat patches, similar to how Google Gears works to intercept response headers and change the headers and body of the response when a document is received with the specified MIME type.
I am wondering if anyone has any good ideas on how this can be achieved in a less negligent / intrusive way.
Edit: Just thought I'd keep an eye on this and mention that I went with the vtable patch to the HTTP / S protocol handlers, and it worked much better than I expected. If anyone else wants to do something like this, I highly recommend taking a look at the Google Gears HttpHandlerPatch class for some inspiration.
source share