Hello! Could you add support for Well-Known Protocol Handlers, as in https://github.com/fedi-to/fedi-to.github.io/blob/main/protocol-handler.md , to KTraderClient? xdg-open uses KTraderClient to resolve certain x-scheme-handler/ "MIME types", including x-scheme-handler/web+[...], so this would make it the appropriate place to add support for these. Thanks!
What would be the expected result of running "ktraderclient5 --mimetype x-scheme-handler/web+example"?
By default, it should produce a DesktopEntryPath for an app (something along the lines of "Default Web Protocol Handler") which parses the URL and sends it to the default https handler, as per the spec. (Well, for "--servicetype Application", at least) Obviously another app may choose to override it if desired. For example an app dedicated to web+example would probably want priority over the fallback handler.
> as per the spec Which specification? What should happen when I do e.g. "xdg-open web+kde:dolphin", assuming there is no explicit app registered for "web+kde"? What would be passed to the scheme handler for https?
this spec, from the issue description https://github.com/fedi-to/fedi-to.github.io/blob/main/protocol-handler.md it only applies to URLs with an authority tho, so something like "web+kde:dolphin" wouldn't work. (also, web+* schemes can be registered by arbitrary websites, so "web+kde:" isn't a particularly good scheme to have. mixing OS tasks with website tasks is a bad idea. "kde:" is fine tho.)
So suppose I do "xdg-open web+example://example.org" then the handler would turn that into "https://example.org/.well-known/protocol-handler?target=web%2Bexample%3A%2F%2Fexample.org" and open that in the browser?
Yeah.