Comment 12 for bug 240133

Revision history for this message
In , C-c07 (c-c07) wrote :

I'll try to implement this, but I do not know yet if I really have the skills
to do it. Be prepared that I may have to give this back to <email address hidden>.

My plan is roughly this:

- Implement a mhtml: protocol handler similar to the jar: handler.
- Implement a stream converter similar to the multipart/x-mixed-replace converter.
- Implement a method to control pending loads.

The stream converter would return the root resource within a mhtml channel and
put the other parts into a cache. On every page load we'd have to check if the
referring URI has a mhtml scheme and if so, translate the URI to be loaded into
a mhtml: URI.

The mhtml channel would simply fetch from cache if the requested resource is
available. If the containing multipart resource is still loading, it would
wait until it becomes available. If the requested resource wasn't included in
the multipart resource, try to get it using the original URI.

If the requested resource isn't in the cache and the containing multipart
resource is not currently loading, we'd have to load it using basically the same
mechanism the stream converter is using.