Open Nocturnalx opened 3 months ago
I can confirm changing the domain registration url to include "http://" before the IP fixed the issue when accessing with the current master branch release, I also noticed that the prompt does say to just input the IP as a standalone IP.
Describe the bug After fetching a standalone IP from the DNS lookup and passing it to build_ui()->parse_html()->fetch_file(), the reqwest::get() causes an error if the IP does not specify http://.
To Reproduce
Expected behavior Browser and/or DNS server should ensure "http://" is added to the address before performing any kind of fetch on it to prevent an error from reqwest.
Desktop (please complete the following information): Arch linux reqwest version 0.12.3
Additional context I have a very simple check ready to PR for if the returned json.ip can be parsed as a standalone IP within fetch_dns() (main.rs:584), but that should really only be done after the DNS has been normalised to either return or not return the http:// prefix on lookup. https://github.com/face-hh/webx/commit/e22cac904ce141d33a3619a5f0313136d47ecc28
Also i noticed Url::parse() (html.rs: parse_html(): line 34) breaks on a standalone IP not being a readable url so never appends index.html but this is just the same problem of a lack of http:// as the fetch issue.