Pluggable Protocol Handler and troubles with IE encoding
I'm writing proxy-like implementation of IE Pluggable Protocol Handler (for http, ftp), I have implemented IInternetProtocol and IInternetProtocolSink with simple logic, just creating through CoCreateClass instance of native protocol handler (reading its CLSID from registry) and passing all calls to it.
But I have strange problems with encoding. When I try to load page without META tag specified encoding in page body, however it is specified in HTTP headers (Content-Encoding header) Explorer resets page encoding to my system default codepage. When my pluggable protocol handler is switched off IE correctly gets codepage from header.
For example, if I try to load pages encoded in utf-8, but without tag <meta http-equiv="content-type" content="text/html; charset=UTF-8">, then I see page in my default encoding (windows-1251).
After all IE seems to lose original Content-Type header. Is there any way to correctly pass this header to underlying Protocol Handler?
Thanks for advice.