| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
url() rejected file:// URLs like file:///var/www because their authority (netloc) is empty or "localhost", neither of which _validate_netloc accepts as a hostname. RFC 8089 defines both an empty and a "localhost" authority as valid for a local file URL. A file URL with a non-local authority (file://example.com/path) still goes through the normal hostname check, unchanged.
| Back | FazBrowse Home | New Git URL |
Fixes #481.
url() rejected file:// URLs such as file:///var/www because their authority (netloc) is empty or "localhost", neither of which _validate_netloc accepts as a hostname. RFC 8089 defines both an empty and a "localhost" authority as valid for a local file URL, so this adds file to the accepted schemes and skips hostname validation for those two authorities specifically.
A file:// URL with a non-local authority (file://example.com/path) still goes through the normal hostname check, unchanged.