Version: unknown (using KDE 3.1.0 (RC6))
Installed from: compiled sources
Compiler: gcc version 2.95.3 20010315 (release)
OS: SunOS (sun4u) release 5.7
When I mail a web page to someone using Location->Send File in Konqueror the mime type of the document always defaults to Unknown application/octet-stream. The web page being mailed should inherit the mime type in Konqueror, in this case text/html. The same thing happens if I try and send a JPEG file, instead of image/jpeg the mime type is Unknown application/octet-stream.
This has been a problem since 3.0.x and continues through 3.1rc6.
I found that the problem appears to be in kmail when using --attach <url> option that the mime type returned by the web server is not preserved. Even if no mime type is available from the server, standard filename extensions should map to a mime type (i.e. *.jpg = image/jpeg).
I previously submitted this bug as bug 53008 under Konqueror, but it should fall under kmail.
This problem remains in 3.1.1. I have not seen this problem on my SuSE Linux setup at
home so it may only be appearing on Solaris and/or Sparc.
Subject: Re: kmail --attach <url> does not preserve mime type in attachment
KMail determines the mime type with
KMimeType::findByURL(aUrl, 0, aUrl.isLocalFile())
But for http://-URLs KMimeType::findByURL always returns
application/octet-stream as mime type. (The API documentation of
KMimeType::findByURL says "If that does not help it looks at the
extension. This is fine for FTP, FILE, TAR and friends, but is not for
HTTP ( cgi scripts! ).".)
If you want to change this then patch your http.procotol. For example by
I agree that it would be ideal if Konqueror somehow passed the mime type
to KMail if the mime type is already known. But this can't be changed
before KDE 3.2.
I converted your bug report to a wish.
Subject: Re: New: kmail --attach <url> does not preserve mime type in attachment
This bug was easier to fix than I thought. It will be fixed in KMail