Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Favicon download shouldn't require a URL schema #2843

Closed
singalen opened this issue Mar 23, 2019 · 3 comments
Closed

Favicon download shouldn't require a URL schema #2843

singalen opened this issue Mar 23, 2019 · 3 comments

Comments

@singalen
Copy link

singalen commented Mar 23, 2019

Summary

Favicon download shouldn't require an URL schema in URL field.

Desired Behavior

Moreover, if a "Title" field looks like web site name (something.com, org, net, io, or whatever domain regex) and URL field is empty, it makes sense to try the "Title" field.

Possible Solution

Use libcurl to fetch a file, or just try all of http, https and what else to fetch the favicon.

Context

I often name Internet accounts after web site URLs. Typing the same again into URL field is unnecessary.

@droidmonkey
Copy link
Member

We will not be searching the title for a url, that is why there is a url field.

@singalen
Copy link
Author

AFAIK, the field was there long before "download favicon" function and keepassxc existed.

There are two schools of thought: "in order to work, the software should be used the way we designed it" and "we designed the software the way that it will generally just work for users who use the software in every way they can imagine".
The first is good when designing a resource-constrained software for machines, or a handful of fellow engineers. The second way is preferable when designing for the ease of use.

@kneitinger
Copy link
Contributor

kneitinger commented Mar 24, 2019

+1 to the scheme not being needed. The QUrl class does require a scheme to make requests if I'm not mistaken, therefore I think the logic should be:

  • If HTTPS, use HTTPS as request scheme
  • If HTTP (or no scheme), try HTTPS as request scheme, but fallback to HTTP (should this be user configurable, like DDG fallback?)
  • If scheme is anything else (smb, file, ftp, cmd, etc), do not attempt download.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants