Default browser setting

Rodney Dawes dobey at ximian.com
Thu Jul 24 02:35:48 EEST 2003


You should query the server for the mime type of the file by doing the
standard http head request, HTTP/1.1 HEAD /path/to/file.foo. Then you
query the mime database to see what applications support it, and if the
said application supports opening from a URI. If it doesn, you run that.
If not, you open it with the application that matches the mime type for
x-url/http or something. Mailto would just bypass and go straight to a
call for x-url/mailto probably. (I'm assuming these are the correct mime
types for the uri schemes. Even if they aren't, it's an example, so
ignore that.) Ideally, this is how the mime stuff would work, and,
afaik, this is mostly how it works in Windows, I think. It at least uses
some mime scheme for uri protocols, anyway.

-- dobey

On Wed, 2003-07-23 at 17:17, Shaun McCance wrote:
> That doesn't seem right.  The "preferred browser" shouldn't be bound to
> the mime type.  It should be bound to the scheme of the URL.  You don't
> know that I'm going to get text/html from the server.  All you know is
> that I've clicked an http link.  What mime type am I supposed to query
> to find out what to use for mailto?
> 
> --
> Shaun




More information about the xdg mailing list