-
-
Notifications
You must be signed in to change notification settings - Fork 412
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
Fix SET-URL #3385
Fix SET-URL #3385
Conversation
Oops, one test fails, investigating |
f4f0e30
to
bb48522
Compare
Done! As I said, I would like to remove DNS lookups completely in later commits, so URLs like @aadcg Please review |
@shamazmazum I'll review soon, thanks. |
@shamazmazum I think there are two issues in this PR.
|
bb48522
to
7644c4a
Compare
UPD: I may be wrong, but firefox does the same: if a query contains a dot, it tries to interpret it as an URL. If your URL does not have a dot, you have to specify the scheme. Surely, firefox never did any DNS lookups to determine if a query is an URL or not. Before 377e9ab the conditional was: ((and check-dns-p
(valid-url-p (str:concat "https://" (query query))
:check-dns-p check-dns-p))
(setf (query query) (str:concat "https://" (query query)))) I just replace UPD2: Check this code from (cond
((valid-url-p (query query)
:check-dns-p nil)
;; Valid URLs should be passed forward.
nil)
((and check-dns-p
(valid-tld-p (query query)))
(setf (query query) (str:concat "https://" (query query)))) What is the logic of using |
@shamazmazum enter |
@aadcg I agree with the first example. I still suggest using Otherwise, I don't know. Cut everything after I am out of ideas :) I'll just let it be if you don't like the idea with TLD check in |
BTW, there is a TLD check in |
Overall, I agree. If we follow this approach, then we don't need to check for dots in the query or am I missing something? To put things into perspective, I've noticed the mess while fixing #2134. I took the approach of changing the minimum. I did mistakes nonetheless (8b00a2f and the bug you mention when querying Some things to take into account:
Let me see the full solution you suggest and then we'll go from there. Thanks! |
Entering a query like "github.com/atlas-engineer" goes directly to the desired web page instead of making a search. This fixes atlas-engineer#3385.
7644c4a
to
fb43af3
Compare
@aadcg I hope, I did it :) I split it into two commits: the first fixes the issue with minimal changes and the second does some clean-up which removes #2134 remains fixed (at least I see not delays on my computer), #3349 fixed, IP addresses work ( Please, re-check if I missed something (I hope not). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shamazmazum overall, I think it's almost ready.
I couldn't find regressions when comparing with master and many issues have been solved.
When comparing to how Firefox behaves, I could only see that it handles localhost
in a more DWIM fashion. E.g. issue python3 -m http.server
and request localhost:8000
. On Firefox it works without adding http://
, unlike Nyxt.
OK. Thanks. I'll do it all later, but firstly I would like to know why use |
Entering a query like "github.com/atlas-engineer" goes directly to the desired web page instead of making a search. This fixes atlas-engineer#3385.
These functions are used no more as nyxt doesn't make DNS lookups to check if URL is correct now.
fb43af3
to
a6fbe7c
Compare
@aadcg I did what you said. You still have to type |
Fixes the following issue reported in #3385. Input such as "github.com/atlas-engineer" must be interpreted as a URL, not as a search query.
@shamazmazum I've pushed your work in commits 14dac1e, 424eff6, 1f58316 and ec082a3. Thank you for your patience! |
Entering a query like "github.com/atlas-engineer" goes directly to the desired web page instead of making a search. This fixes atlas-engineer#3385.
Fixes the following issue reported in #3385. Input such as "github.com/atlas-engineer" must be interpreted as a URL, not as a search query.
As discussed in #3383, I open another PR which fixes navigation to URLs like "github.com/atlas-engineer".
It brings two changes:
valid-url-p
to check if"https://"
+ query is a valid URL.valid-url-p
move the check of TLD validity out of(or (not check-dns-p) ...)
block. Maybe it is my fault (I'm too lazy to do git blame), but this has nothing to do with DNS lookup.Now you can set URL to
github.com
,github.com/foobar
,wiki foobar
orfoobar
and get what you want in all those cases.