Intergrating mht file to konqueror

Spiros Georgaras sngeorgaras at otenet.gr
Fri Nov 5 22:13:20 GMT 2004


Leo Savernik wrote:
> Am Freitag, 5. November 2004 12:52 schrieb Spiros Georgaras:
> > > Don't you test for index.html, and if no such file can be found,
> > > display a directory listing instead? (I don't know how IE generates mht
> > > files, and I cannot currently test it).
>
> [...]
>
> > No I do not test for index.html, I test for a 'text/html' document and i
> > name it index.html.
>
> You're right; at work I saved a test mht file, and I realised that an mhtml
> is actually nothing but a multipart/mime message (so there's nowhere an
> index.html per default, silly me).
>
> However, the multipart message predefines the default file nonetheless with
> Content-Type: multipart/related; boundary="<xxxxxxxxxxx>";
> type="<mime-type>", so if <mime-type> is text/html, it's the index. 

All the mht files I've seen are just like that

> 
> If it's not (and if it isn't any other mime-type recognised by khtml like
> application/xhtml+xml), it's not an html file, and it should be represented
> as a directory listing.
>
Haven't seen anything like that in mht files....
If you have such a mhtml file, please send or point to it.

> So I don't quite understand why you test for "*a* 'text/html' document"
> instead of "*the* document as specified by the Content-Type header".
>
Well this is done like that because there are cases when a mht file contains 
more than one 'text/html' document. I have seen this when a <file>.js is 
contained in the file, and it is defined as that ('text/html'). I don't know 
why this happens, but it does. Then you have to find (and display) the real 
html document




More information about the kfm-devel mailing list