I have a page "a.html" with this simple HTML:
<img src="a.png">
Both "xxm://test/a.html" and "xxm://test/a.png" work in Firefox, and
give above HTML or the PNG image data. The problem is with displaying
the HTML page, the image doesn't get loaded. When I debug, I see:
- NewChannel gets called for a.png, (when Firefox is processing an
OnDataAvailable notice on a.html),
- NotificationCallbacks is set (I only need to keep a reference,
right?)
- RequestHeader "Accept" is set to "image/png,image/*;q=0.8,*/*;q=0.5"
- but then, the channel object is released (most probably due to a
zero reference count)
Looking at other requests, I would expect some other properties to get
set (such as LoadFlags or OriginalURI) and AsyncOpen to get called,
from where I can start getting the request responded to.
I've been looking around in the vast library of source-code (using
mxr.mozilla.org/firefox), and find only one instance of the "Accept"
string that get's added to the request headers:
http://preview.tinyurl.com/le7m77
It queries for nsIHttpChannelInternal right after creating a new
channel, but I don't even get this QueryInterface call through...
The debugger I use doesn't appear to catch any exceptions, but I guess
something is throwing something.
I also find it worrisome that I'm required to implement a permanently
non-frozen interface to get images on pages to work...
http://mxr.mozilla.org/firefox/source/netwerk/protocol/http/public/nsIHttpChannelInternal.idl#44
Greetings
Stijn