[Interest] QRC URL normalization
Thiago Macieira
thiago.macieira at intel.com
Wed Nov 30 01:40:49 CET 2016
On terça-feira, 29 de novembro de 2016 14:33:34 PST Jérôme Godbout wrote:
> Not sure, but normal url would be
>
> protocol://path
> like http://www.qt.io
>
> : is the protocol splitter delimiter
>
> // is annoncing the path follow
That's not correct. A URL is:
scheme:hierarchy [?query] [#fragment]
Where the hierarchy can be one of:
non-absolute-path
/absolute-path
//authority/absolute-path
So the following URLs are correct and different from one another.
scheme:foo
scheme:/foo
scheme://foo
scheme:///foo
The particular case of whether scheme:/foo and scheme:///foo represent the
same resource depends on the scheme's handler. For most schemes, an empty-but-
present hostname is equivalent to an absent hostname: for the "file" scheme,
they would be the same file.
QUrl honours the distinction of present-but-empty and absent parts of the URL,
with the exception of the port number.
Note: I have no idea about the OP's problem.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
More information about the Interest
mailing list