[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    KMimeType::findByURL() and HTTP urls
From:       <m.arriaga () netcabo ! pt>
Date:       2003-01-01 22:47:54
[Download RAW message or body]

Hi everyone, 
 
I need to correctly determine the MIME type of a file located at the other end of a HTTP url. Some 
times the extension of the file name in the URL provides misleading information, eg, 
 
http://www.example.org/search.pl 
 
is not Perl source, but a HTML page. 
 
The documentation for KMimeType::findByURL() states that it doesn't work correctly for HTTP urls, and 
that in those situations KRun should be used instead. However, looking that the documentation for 
KRun I couldn't find any suitable method I might call to determine the MIME type of a file given a 
HTTP url. 
 
Besides actually downloading the said file and then running KMimeType::findByPath() on it, is there 
any other (faster?) way of determining a remote file's MIME type when the protocol is HTTP?  
 
Thank you for any tip. 
 
Best wishes, 
 
Manuel

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic