URL and application handling/registration standard

Bastien Nocera hadess at hadess.net
Mon Oct 22 01:56:57 PDT 2012


On Mon, 2012-10-22 at 10:30 +0200, David Faure wrote:
> On Monday 22 October 2012 09:45:31 Bastien Nocera wrote:
> > On Sun, 2012-10-21 at 22:58 +0200, David Faure wrote:
> > > On Friday 19 October 2012 17:09:50 David Faure wrote:
> > > > > Better solution yet, imho: Screw being too clever.
> > > > > 
> > > > >  - Have apps list protocols they support. Eg
> > > > > 
> > > > > Protocols=x-scheme-handler/http;x-scheme-handler/https;
> > > > 
> > > > Never ever do this, for the reasons above. HTTP is too complex to send
> > > > all
> > > > http urls to a single app.
> > > 
> > > Ouch, and I just found out that /usr/share/applications/firefox.desktop
> > > says
> > > 
> > > MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.
> > > xul+xml;text/mml;application/x-
> > > xpinstall;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/f
> > > tp;
> > > 
> > > on OpenSUSE 12.1 at least.
> > > (MozillaFirefox-15.0.1-2.40.1.x86_64)
> > > 
> > > Didn't we say no application should ever associate itself with x-scheme-
> > > handler/http?
> > 
> > That's not what we said. We said that no non-browser applications should
> > do that.
> 
> I don't like it, but it doesn't matter anymore, I have fixed my patch from 
> yesterday so that x-scheme-handler doesn't have priority over KIO protocol 
> handlers, if both exist.

I think that's the wrong way to do it, but your call.

> > > This is supposed to have priority over anything else, right? (i.e. over
> > > the
> > > standard mechanism of launching an app based on the file contents).
> > > That's fine for special protocols (magnet://, telnet:// etc.) but not for
> > > HTTP...
> > 
> > Why not? Sniffing HTTP URLs is completely broken. It breaks one-time
> > URLs.
> 
> Not if you can then give the connexion out to the app which will hande it.
> But yeah this requires that the first and second app use the same VFS.
> 
> However "sending all HTTP URLs to the browser" is broken too - e.g. if it's a 
> .odt you end up launching a browser just to then launch the office application.
> So double-download there too (of the headers at least).

You'll launch the browser, and either it will download the file and pass
it on to your office application, or (better from my point of view), the
preview is handled by within the browser (as it is in a lot of browsers
for PDFs or other types of office documents) and it offers you to
download it.




More information about the xdg mailing list