We want to support relative file: URLs like file:local.db, which refers to file local.db in the current directory. Unfortunately, these URLs are not valid according to RFC 8089, which defines the "file" URI scheme, so the standard URL object from JavaScript is not able to parse them correctly.
For this reason, this PR introduces a custom parser that parses URIs according to the general syntax from RFC 3983, without applying scheme-specific restrictions.
We want to support relative
file:
URLs likefile:local.db
, which refers to filelocal.db
in the current directory. Unfortunately, these URLs are not valid according to RFC 8089, which defines the "file" URI scheme, so the standardURL
object from JavaScript is not able to parse them correctly.For this reason, this PR introduces a custom parser that parses URIs according to the general syntax from RFC 3983, without applying scheme-specific restrictions.