== Question == How do I examine a media type by content? I would like to disregard information provided by the server.
== Motivation == Information provided by the server is often inaccurate (e.g video sent as text/plain, or application/x-msdownload). Even the local file server which is handled by FreeDesktop shared mime info gives wrong answers sometimes. Examining media types by content requires downloading a small initial portion of a resource, and downloading the whole thing to feed it to (KMimeType ::findbyContent) may be very wasteful. So the solution is to download an initial fragment; however, only the media type database knows exactly how long that initial fragment would be, and I do not know any way to determine the required length up front. == Suggestion == Let’s add a flag to KIO ::TransferJob determine the media type by content. That way, it could signal the media type as soon as it is able to determine it (from partial content) and the rest of the job could be discarded if it turns out that the client is not prepared or unwilling to handle this kind of data. Best regards, Chris >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
